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. problem with javascript

problem with javascript

Scheduled Pinned Locked Moved ASP.NET
questionjavascripthelp
4 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.
  • M Offline
    M Offline
    morteza57
    wrote on last edited by
    #1

    Hi, i used from this javascript code in my website an it works correctly by IE. But it dos not work with Firefox. what is it's equivalent compatible with Firefox? Thank you. $get('Panel1').style.left=100; $get('Panel1').style.top =100; $get('Panel1').style.posWidth=100; $get('Panel1').style.posHeight=100;

    C 1 Reply Last reply
    0
    • M morteza57

      Hi, i used from this javascript code in my website an it works correctly by IE. But it dos not work with Firefox. what is it's equivalent compatible with Firefox? Thank you. $get('Panel1').style.left=100; $get('Panel1').style.top =100; $get('Panel1').style.posWidth=100; $get('Panel1').style.posHeight=100;

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      What is $get ? I've never seen that. document.getElementById is how you find an element, and you should do it once, check the returned value, then use that variable.

      Christian Graus - Microsoft MVP - C++ "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )

      M 1 Reply Last reply
      0
      • C Christian Graus

        What is $get ? I've never seen that. document.getElementById is how you find an element, and you should do it once, check the returned value, then use that variable.

        Christian Graus - Microsoft MVP - C++ "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )

        M Offline
        M Offline
        morteza57
        wrote on last edited by
        #3

        Dear Christian Graus, $get is a function in ASP.NET AJAX that it's functionality is the same document.getElementById

        C 1 Reply Last reply
        0
        • M morteza57

          Dear Christian Graus, $get is a function in ASP.NET AJAX that it's functionality is the same document.getElementById

          C Offline
          C Offline
          Christian Graus
          wrote on last edited by
          #4

          OK, but it doesn't use AJAX, right ? SO, I'd just do it properly as per what I outlined. I'd also do what I suggested to see if it fixes FF, and if it doesn't, you can use Firebug in FF to debug your code and work out what the property is ( but what you have looks right to me )

          Christian Graus - Microsoft MVP - C++ "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )

          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