what is the problem with my javascript code, it is not working.
- by Shantanu Gupta
I am trying to call my function named isUrgencyTypeValid from my javascript code but it is not working. Please check what is the problem in my code.
My javascript function is not being called.
HTML Code
<td colspan="2" align="center"><input id="btnSubmit" type="submit" value="submit" runat="server"/></td></tr>
jQuery Call function
$("#btnSubmit").bind("click",function(){
isUrgencyTypeValid();
});
javascript implemented function
function isUrgencyTypeValid()
{
alert("asd");
var i=0;
for(i=0;i<$("radio[name='urgencyType']").length;i++)
{
if($("radio[name='urgencyType']")[i].checked)
{
alert($("radio[name='urgencyType']")[i].value);
return true;
}
return false;
}