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. General Programming
  3. Java
  4. Why does this work in IE 5 but not Netscape 6?

Why does this work in IE 5 but not Netscape 6?

Scheduled Pinned Locked Moved Java
question
2 Posts 2 Posters 35 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.
  • J Offline
    J Offline
    jerry0davis
    wrote on last edited by
    #1

    The following code in IE works fine but won't in Netscape! Anyone got any ideas why please? Netscape never gets past the line beginning "var txtObj =" function Expand(txtID) { var txtObj = document.all(txtID + '_big'); if (txtObj.style.display == 'none') txtObj.style.display = ''; else txtObj.style.display = 'none'; } : : etc

    R 1 Reply Last reply
    0
    • J jerry0davis

      The following code in IE works fine but won't in Netscape! Anyone got any ideas why please? Netscape never gets past the line beginning "var txtObj =" function Expand(txtID) { var txtObj = document.all(txtID + '_big'); if (txtObj.style.display == 'none') txtObj.style.display = ''; else txtObj.style.display = 'none'; } : : etc

      R Offline
      R Offline
      Rick Benish
      wrote on last edited by
      #2

      try this: var txtObj = eval( 'document.' + txtID + '_big'); this should work unless your calling this id from a different layer. document.all[] really doesn't work in netscrap. You have to drill down to the elements you want. Hope this helps!!

      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