Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. code not work in mozilla firefox

code not work in mozilla firefox

Scheduled Pinned Locked Moved ASP.NET
questionhtmlbusiness
5 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • U Offline
    U Offline
    Unknown Ajanabi
    wrote on last edited by
    #1

    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

    I 1 Reply Last reply
    0
    • U Unknown Ajanabi

      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

      I Offline
      I Offline
      Imran Khan Pathan
      wrote on last edited by
      #2

      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

      U 1 Reply Last reply
      0
      • I Imran Khan Pathan

        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

        U Offline
        U Offline
        Unknown Ajanabi
        wrote on last edited by
        #3

        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

        I 1 Reply Last reply
        0
        • U Unknown Ajanabi

          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

          I Offline
          I Offline
          Imran Khan Pathan
          wrote on last edited by
          #4

          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.

          U 1 Reply Last reply
          0
          • I Imran Khan Pathan

            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.

            U Offline
            U Offline
            Unknown Ajanabi
            wrote on last edited by
            #5

            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

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups