Go Back   CodingForums.com > :: Client side development > JavaScript programming

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 06-25-2002, 01:53 AM   PM User | #1
Crasy_J
New Coder

 
Join Date: Jun 2002
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Crasy_J is an unknown quantity at this point
Question IFRAME Trouble: how to know if the user clicks it...

Hi,
I'm using a menu on my page and an IFrame. The webpage displayed inside the Iframe consists of a frameset of two frames.

I want to close the Menu when someone clicks on the iframe. To do so, I'm looking for an event that fires "onclick" or something like that when one clicks on the Iframe...

any Ideas?

thank you for your patience and any help, ideas, solutions.



regards

Joanna
Crasy_J is offline   Reply With Quote
Old 06-25-2002, 02:21 AM   PM User | #2
x_goose_x
Regular Coder

 
Join Date: Jun 2002
Location: Montreal, Canada
Posts: 644
Thanks: 0
Thanked 0 Times in 0 Posts
x_goose_x is an unknown quantity at this point
You can't use onclick on the iframe tag itself, but you can use onfocus. Just give the div that the menu is in an id and you can use the following:

<iframe onfocus="document.getElementById('theid').style.display='none';" ...
x_goose_x is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 07:18 PM.


Advertisement
Log in to turn off these ads.