Yes, I know there are many posts on this subject, I've read a great majority of them, but to no avail. This works coming from the external file,
$(document).ready(function () {
alert("Ready")
});
but this doesn't,
$(document).ready(function () {
$('#<%=RadioButtonList1.ClientID %> input').change(function () {
$("#HiddenField1").val((this).value); //places selected value in HiddenField1
});
});
$(document).ready(function () {
$("#Button1").mouseenter(function () { //see if Texture and Color Selections were made
var z = $("#HiddenField1").val(); //
//alert(z)
if (z != "xx") { // a Product was chosen
var t = $("#DropDownList1").val(); // Texture
if (t == "Choose a Texture") {
alert("Please Choose a Texture")
}; /// end if
var c = $("#DropDownList2").val(); // Color
if (c == "Choose a Color") {
alert("Please Choose a Color")
}; /// end if
}; /// end if
}); /// end function
}); /// end Ready
In fact they work directly in the page without the $(document).ready(function () {
while it doesn't work at all either way in the external file. An interesting tidbit, in the #<%=RadioButtonList1.ClientID %> input')
the <%
and %>
are not yellow in the external file while they are as seen if directly on the page. I know I am firing the external file as evidenced by the simple $(document).ready(function alert("Ready")
working.
What am I missing, thank you.