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. JavaScript
  4. JavaScript not working for chrome

JavaScript not working for chrome

Scheduled Pinned Locked Moved JavaScript
javascripthelp
2 Posts 2 Posters 4 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.
  • V Offline
    V Offline
    Varun Sareen
    wrote on last edited by
    #1

    Hello Friends, I have a javascript function of enabling and disabling a radio button on the selection of another radio button on the same form. The function is :-

    function GetRadioButtonValue()
    {
    if (document.getElementById("ctl00_Main_RadioButtonList2_0").checked==true)
    {
    document.getElementById("ctl00_Main_RadioButtonList1_2").disabled=true;
    $find('ctl00_Main_AutoCompleteExtender2').set_contextKey(document.getElementById("ctl00_Main_hdl4").value);
    }
    else if (document.getElementById("ctl00_Main_RadioButtonList2_0").checked==false)
    {
    document.getElementById("ctl00_Main_RadioButtonList1_2").disabled=false;
    $find('ctl00_Main_AutoCompleteExtender2').set_contextKey(document.getElementById("ctl00_Main_hdl5").value);
    }
    }

    The same function is successfully running on Mozilla and performing the necessary operation but not working on chrome. Why this is happening I am not able to get. Kindly help. Thanks

    Varun Sareen (Dot Net Developer)

    P 1 Reply Last reply
    0
    • V Varun Sareen

      Hello Friends, I have a javascript function of enabling and disabling a radio button on the selection of another radio button on the same form. The function is :-

      function GetRadioButtonValue()
      {
      if (document.getElementById("ctl00_Main_RadioButtonList2_0").checked==true)
      {
      document.getElementById("ctl00_Main_RadioButtonList1_2").disabled=true;
      $find('ctl00_Main_AutoCompleteExtender2').set_contextKey(document.getElementById("ctl00_Main_hdl4").value);
      }
      else if (document.getElementById("ctl00_Main_RadioButtonList2_0").checked==false)
      {
      document.getElementById("ctl00_Main_RadioButtonList1_2").disabled=false;
      $find('ctl00_Main_AutoCompleteExtender2').set_contextKey(document.getElementById("ctl00_Main_hdl5").value);
      }
      }

      The same function is successfully running on Mozilla and performing the necessary operation but not working on chrome. Why this is happening I am not able to get. Kindly help. Thanks

      Varun Sareen (Dot Net Developer)

      P Offline
      P Offline
      phil o
      wrote on last edited by
      #2

      Hi, Is there a debug function in Chrome ? If so, you should debug your script and see where the problem is (it could be document.GetElementById that returns a null value, because it may not be supported by Chrome). First of all, you need to check which values are returned by the methods you're using ; once you've found them, you have to replace them by ones that Chrome recognizes. Making a web site compatible for all browsers can really be a tricky task.

      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