code not work in mozilla firefox
-
in this function i validate textbox value and radio button on button click event it work in internet explorer very well. but not work in mozilla firefox what is the reason?? function check(cid) { var red=document.getElementById('rd'); var val="PH"; if(rd[0].checked==true) { val="KH"; } var box1 = document.getElementById('txtsearch').value; box1 = box1.replace(/^\s*|\s*$/g,''); var box2 = document.getElementById('rd'); if(box2.checked==true) { if(box1=="") { alert("Please Enter a Keyword, Business or Category"); return false; } else { window.parent.location.href="../keywordsearch.aspx?kq="+document.getElementById('txtsearch').value+"&stype="+val+"&city="+cid; } } else { if(box1.length<6 || box1.length>11 ) { alert("Please Enter Phone Number(min:6 digit and max:10) "); return false; } else { if(IsNumeric(box1)) window.parent.location.href="../keywordsearch.aspx?kq="+document.getElementById('txtsearch').value+"&stype="+val+"&city="+cid; else { alert("Please Enter Only numeric Number "); return false; } } } } html code /////////////////////////
Search
-
in this function i validate textbox value and radio button on button click event it work in internet explorer very well. but not work in mozilla firefox what is the reason?? function check(cid) { var red=document.getElementById('rd'); var val="PH"; if(rd[0].checked==true) { val="KH"; } var box1 = document.getElementById('txtsearch').value; box1 = box1.replace(/^\s*|\s*$/g,''); var box2 = document.getElementById('rd'); if(box2.checked==true) { if(box1=="") { alert("Please Enter a Keyword, Business or Category"); return false; } else { window.parent.location.href="../keywordsearch.aspx?kq="+document.getElementById('txtsearch').value+"&stype="+val+"&city="+cid; } } else { if(box1.length<6 || box1.length>11 ) { alert("Please Enter Phone Number(min:6 digit and max:10) "); return false; } else { if(IsNumeric(box1)) window.parent.location.href="../keywordsearch.aspx?kq="+document.getElementById('txtsearch').value+"&stype="+val+"&city="+cid; else { alert("Please Enter Only numeric Number "); return false; } } } } html code /////////////////////////
Search
Unknown Ajanabi wrote:
if(rd[0].checked==true)
What is "rd" in above code? I think "rd" is not an object.It must be "red"
please don't forget to vote on the post that helped you.
modified on Saturday, May 24, 2008 3:17 AM
-
Unknown Ajanabi wrote:
if(rd[0].checked==true)
What is "rd" in above code? I think "rd" is not an object.It must be "red"
please don't forget to vote on the post that helped you.
modified on Saturday, May 24, 2008 3:17 AM
if(rd[0].checked==true) What is "rd" in above code? I think "rd" is not an object.I must be "red" "rd" is radio button id
no knowledge in .net
-
if(rd[0].checked==true) What is "rd" in above code? I think "rd" is not an object.I must be "red" "rd" is radio button id
no knowledge in .net
Have you used RadioButtonList control or just RadioButton?
Unknown Ajanabi wrote:
if(rd[0].checked==true)
You can not use object ID at this way. You have to get an object of control. for example
if(document.getElementById('rd').checked==true)
please don't forget to vote on the post that helped you.
-
Have you used RadioButtonList control or just RadioButton?
Unknown Ajanabi wrote:
if(rd[0].checked==true)
You can not use object ID at this way. You have to get an object of control. for example
if(document.getElementById('rd').checked==true)
please don't forget to vote on the post that helped you.
if(rd[0].checked==true) You can not use object ID at this way. You have to get an object of control. for example if(document.getElementById('rd').checked==true) u r write but the check()event not work in mozilla firefox explorer i wont to know the reason why is it noy work ??
no knowledge in .net