This week's book giveaway is in the Artificial Intelligence forum.
We're giving away four copies of Pragmatic AI and have Noah Gift on-line!
See this thread for details.
Win a copy of Pragmatic AI this week in the Artificial Intelligence forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Junilu Lacar
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Ganesh Patekar
  • Tim Moores
  • Pete Letkeman
  • Stephan van Hulst
Bartenders:
  • Carey Brown
  • Tim Holloway
  • Joe Ess

making an IFRAME disappear through javascript  RSS feed

 
Ranch Hand
Posts: 3695
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi.

I'm running into a problem that is apparently well-known, except to me, and of course it's very late in the game.

We have a certain set of users of our website that are very important. They number in the 1's. And they use IE 5.1 on a MAC platform.

We have a javascript drop-down menu that is experiencing the dreaded IFRAME z-index trouble. The menu drops down and disappears behind the iframe. This is not a problem with any other browser/platform combo (aside from NS4.7, which doesn't even do iframes).

There was a hint of a solution somewhere that took a cue from the selectbox problem (hide the selectbox) and it claimed that I could hide the iframe when the menu dropped down. The problem is, it did this for ALL browsers, and it actually only hid the *contents* of the IFRAME and not the IFRAME itself.

So.. javascript wizards, I need some help!

Is it possible to hide an entire iframe? I've seen vague hints about using ilayers. This is all archane magic to me, and I've got a whole other list of things to do today, so I'm going to set my line here and hopefully have a nibble.

Why do people leave 'huge changes' until 2 days before the 'drop dead' line???
 
Mike Curwen
Ranch Hand
Posts: 3695
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Oh yes, we're using this menu...

http://www.dhtmlcentral.com/projects/coolmenus/?m=10

And here is the code that hides the 'contents' of the iframe... I've modified it to exclude IE6 (I'd exclude IE5 on Windows, but I'm not sure how to do this).
 
Author and ninkuma
Marshal
Posts: 66789
168
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What mechanism are you using to hide the iframe that's only hiding the content? (Or did you show that and I missed it?)
I don't have a Mac handy at the moment to test it, but my first tactic would be to set a style of display:none or visibility:hidden on the iframe (depending on what effect you want when hidden). Is that what you tried?
hth,
bear
[ August 08, 2003: Message edited by: Bear Bibeault ]
 
Mike Curwen
Ranch Hand
Posts: 3695
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
the mechanism is the code posted above.

It's supposed to be appended on to the end of the menu's javascript file. That file is much too long to post, but available from the dhtmlcentral site I linked in the second post.
 
Mike Curwen
Ranch Hand
Posts: 3695
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok, thanks for the pointer bear.

I've scrubbed out all the unnecessary positional math tricks from the above code. We always want to hide the iframe, because our menu will *always* disappear under it.

I've got the frame to hide itself, but I can't seem to get it to unhide...

Can anyone see anything in the code below that is obviously wrong?
 
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I posted something in the MO. I will look into it more later.
 
Mike Curwen
Ranch Hand
Posts: 3695
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For this particular javascript menu (coolmenu) this appears to do the trick:
iwrap is the id of the iframe i'm trying to hide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!