Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Web Programming > JavaScript > Javascript How-To
|
Javascript How-To Ask your "How do I do this with Javascript?" questions here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Javascript How-To section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 15th, 2006, 03:07 AM
Registered User
 
Join Date: May 2006
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default to get the menu closed when on iframes

Hi ,

Could you please tell me how can the menus cum submenus be closed on a window while navigating to an iframe which is on the right of the menus. The closing of the menus does not happen when navigating onto the iframes,but it occurs once i leave from the iframes. I have already written the javascript code for the for the onmouseover and onmouseout events of the menu buttons . But the onmouseout event is not fired when navigating onto the iframe.Please Help. It is very urgent. I can sent you the code if necessary

Thanks & Regards



 
Old May 15th, 2006, 04:30 AM
Friend of Wrox
 
Join Date: May 2004
Posts: 212
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi Denny,

What do you mean when you say "navigating onto the iframes"? Just moving your mouse over the iframe? If so you could call an onmouseover of the iframe itself.

Joe

 
Old May 15th, 2006, 05:22 AM
Registered User
 
Join Date: May 2006
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

[quote]Originally posted by interrupt
 Hi Denny,

What do you mean when you say "navigating onto the iframes"? Just moving your mouse over the iframe? If so you could call an onmouseover of the iframe itself.
Joe

Hi Joe,
When navigating i meant moving my mouse to the iframes which is on the right handside of the menu/submenu lists. There is no onmouseover event for iframes.When my mouse is on the menus all the submenus lists but when I move my mouse onto the iframes which on the right of these menus,the menus still continue to be there until i leave from the iframes to any other part of the window.
I hope this clarifies Joe




 
Old May 15th, 2006, 05:26 AM
Registered User
 
Join Date: May 2006
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

[quote]quote:Originally posted by Denny Davis
 
Quote:
Originally posted by interrupt
Quote:
 Hi Denny,

What do you mean when you say "navigating onto the iframes"? Just moving your mouse over the iframe? If so you could call an onmouseover of the iframe itself.
Joe

Hi Joe,
When navigating i meant moving my mouse to the iframes which is on the right handside of the menu/submenu lists. There is no onmouseover event for iframes.When my mouse is on the menus all the submenus lists but when I move my mouse onto the iframes which on the right of these menus,the menus still continue to be there until i leave from the iframes to any other part of the window.
I hope this clarifies Joe

One more thing Joe . The work i am doing has the similar menus as you see in www.emirates.com/uae
The only difference is that in the above website they have not used an iframe whereas i have tried to use an iframe on the right of the menus.

Thanks&Regards
Denny Davis



 
Old May 15th, 2006, 07:18 AM
Friend of Wrox
 
Join Date: May 2004
Posts: 212
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Sorry Denny, perhaps I wasn't making myself clear. What I mean is not to use <iframe onmouseover = "aFunction()">, but to use the actual body element of the iframe source document to call an onmouseover, in turn calling a function from either within the iframe source document, or from the main page (where the menu itself is contained).

As for whther or not there is an onmouseover event for the iframe tag, there actually is. I've just experimented with the following and it worked fine in IE6:

<html>
<head>
<title>IFR Onmousover Test</title>
</head>
<body>
<iframe src = "ifr.html" onmouseover = "alert('Hello World!')">Nothing to Display</iframe>
</body>
</html>

It may be that there are problems validating the markup, if this is the case you may have to write your own DTD to cope with any errors you might get.

Hope this helps
Joe





Similar Threads
Thread Thread Starter Forum Replies Last Post
Using IFrames gobotsoup ASP.NET 2.0 Basics 7 March 9th, 2007 01:47 PM
iframes Y_Ali Javascript 1 December 18th, 2006 07:41 AM
Iframes? Thagi ASP.NET 1.x and 2.0 Application Design 0 April 7th, 2006 07:34 AM
Scrolling in iframes-conflict Kalar HTML Code Clinic 0 April 4th, 2006 05:41 PM
iframes?Do you know about it? help me then nerssi Javascript 4 September 25th, 2004 10:51 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.