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. Click() event not working in firefox

Click() event not working in firefox

Scheduled Pinned Locked Moved ASP.NET
javascript
5 Posts 4 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.
  • K Offline
    K Offline
    kjsl2k9
    wrote on last edited by
    #1

    hi all, I am using document.getElementById("controlname").click() in javascript.It is working fine in IE but not working in firefox.Please tell how it can be corrected.

    T E N 3 Replies Last reply
    0
    • K kjsl2k9

      hi all, I am using document.getElementById("controlname").click() in javascript.It is working fine in IE but not working in firefox.Please tell how it can be corrected.

      T Offline
      T Offline
      T M Gray
      wrote on last edited by
      #2

      What kind of control is it? Are you sure that the getElementById call is returning an object?

      K 1 Reply Last reply
      0
      • K kjsl2k9

        hi all, I am using document.getElementById("controlname").click() in javascript.It is working fine in IE but not working in firefox.Please tell how it can be corrected.

        E Offline
        E Offline
        Ennis Ray Lynch Jr
        wrote on last edited by
        #3

        document.getElementById("<%=ContolName.ClientID%>");

        Need custom software developed? I do custom programming based primarily on MS tools with an emphasis on C# development and consulting. I also do Android Programming as I find it a refreshing break from the MS. "And they, since they Were not the one dead, turned to their affairs" -- Robert Frost

        1 Reply Last reply
        0
        • K kjsl2k9

          hi all, I am using document.getElementById("controlname").click() in javascript.It is working fine in IE but not working in firefox.Please tell how it can be corrected.

          N Offline
          N Offline
          Not Active
          wrote on last edited by
          #4

          Use a library, like JQuery, that has cross browser support rather than trying to deal with multiple browser issues.


          I know the language. I've read a book. - _Madmatt

          1 Reply Last reply
          0
          • T T M Gray

            What kind of control is it? Are you sure that the getElementById call is returning an object?

            K Offline
            K Offline
            kjsl2k9
            wrote on last edited by
            #5

            hi, yes document.getElementById("buttonid") is returning an object in both IE and Firefox.The problem only is that i had to fire the click event of the button using the click event in the javascript which is i think is not supported by FF.

            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