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

Firefox javascript problem

Scheduled Pinned Locked Moved Web Development
helpjavascripthtmlquestion
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
    marky777
    wrote on last edited by
    #1

    Hi all. I have a link on an html page that expands/collapses a section within a table. It works fine in IE except firefox. It show the expanded table directly below a "show more" link, and this works except in firefox, where it display the expanded control right at the bottom of the page. Does anyone know what could be wrong? Here is the javascript method to expand/collapse: function ShowExpand(but,linkID) { var el = document.getElementById(linkID); if (el!=null) { if (el.style.display == "block") { el.style.display = "none"; } else { el.style.display = "block"; } } } This is how i call the method: <span class="moreinfolink" onclick="ShowExpand(this,'AssPPlInfo'); return false;">(More Information)</span> Is there anything i am doing wrong hich firefox is fussy about? Any help woule be greatly appreciated. M

    S 1 Reply Last reply
    0
    • M marky777

      Hi all. I have a link on an html page that expands/collapses a section within a table. It works fine in IE except firefox. It show the expanded table directly below a "show more" link, and this works except in firefox, where it display the expanded control right at the bottom of the page. Does anyone know what could be wrong? Here is the javascript method to expand/collapse: function ShowExpand(but,linkID) { var el = document.getElementById(linkID); if (el!=null) { if (el.style.display == "block") { el.style.display = "none"; } else { el.style.display = "block"; } } } This is how i call the method: <span class="moreinfolink" onclick="ShowExpand(this,'AssPPlInfo'); return false;">(More Information)</span> Is there anything i am doing wrong hich firefox is fussy about? Any help woule be greatly appreciated. M

      S Offline
      S Offline
      Shog9 0
      wrote on last edited by
      #2

      marky777 wrote:

      AssPPlInfo

      What sort of an element has this ID? If it's a DIV or other element that normally uses display: block then you should be fine. If it's a table (display: table), a table row (display: table-row), table cell (guess...), etc. you'll run into problems with things not displaying right. IE sorta handles this because older versions of IE didn't actually support table display styles.

      Citizen 20.1.01

      'The question is,' said Humpty Dumpty, 'which is to be master - that's all.'

      M 1 Reply Last reply
      0
      • S Shog9 0

        marky777 wrote:

        AssPPlInfo

        What sort of an element has this ID? If it's a DIV or other element that normally uses display: block then you should be fine. If it's a table (display: table), a table row (display: table-row), table cell (guess...), etc. you'll run into problems with things not displaying right. IE sorta handles this because older versions of IE didn't actually support table display styles.

        Citizen 20.1.01

        'The question is,' said Humpty Dumpty, 'which is to be master - that's all.'

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

        Hi, thanks for your help. It is a tbody element. For this element, what display mode would i use? Thanks again.

        S 1 Reply Last reply
        0
        • M marky777

          Hi, thanks for your help. It is a tbody element. For this element, what display mode would i use? Thanks again.

          S Offline
          S Offline
          Shog9 0
          wrote on last edited by
          #4

          Try: table-row-group

          Citizen 20.1.01

          'The question is,' said Humpty Dumpty, 'which is to be master - that's all.'

          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