Forum Moderators: open

Message Too Old, No Replies

checking for visible objects in IE6

checking for visible

         

piggybank1974

11:29 pm on Feb 10, 2003 (gmt 0)

10+ Year Member



hi there everybody

I've hit a small snag and wondered if anybody could help

first thing is how does the onmouseout event work, here i will explain why i'm asking:

I have this code in a menu a sub menu that is:
<!-- Sub Menus BTEC -->
<SPAN class=dropbox ID=mbox1 STYLE="LEFT: 0px;" onmouseout="outHeaderImageMenu('mbox1');">
<A class=menuitem href="http://www.example.com"><IMG BORDER="0" SRC="idepill.gif" WIDTH="91px" HEIGHT="27px"></A><BR>
<A class=menuitem href ="#" >Home Page</A><BR>
<A class=menuitem href ="#" >Go Home</A><BR>
<A class=menuitem href ="#" >Go Back</A>
</SPAN>

What i'm doing is when i put my mouse over my image:

<!-- BTEC MENU -->
<SPAN class=menublock onmouseover="OpenMenu('mbox1');" onmouseout="CloseMenu('mbox1');" style="LEFT: 0px;">

<A onmouseover="overHeaderImageMenu('mbox');"><IMG BORDER="0" SRC="BTEC1.gif" WIDTH="91px" HEIGHT="30px" name='btec'>jason</A>

<!-- Sub Menus BTEC -->
<SPAN class=dropbox ID=mbox1 STYLE="LEFT: 0px;" onmouseout="outHeaderImageMenu('mbox1');">
<A class=menuitem href="http://www.example.com"><IMG BORDER="0" SRC="idepill.gif" WIDTH="91px" HEIGHT="27px"></A><BR>
<A class=menuitem href ="#" >Home Page</A><BR>
<A class=menuitem href ="#" >Go Home</A><BR>
<A class=menuitem href ="#" >Go Back</A>
</SPAN>
</SPAN>

an onmouseover event is triggered no problem there works great. All the onmouseover does really is load another image over the loaded one a sort of roll over but not a drop down menu any way this is where the bug comes in, what i'm tring to do is when this sub menu goes by the user moving the cursor away from the sub menu i want the main image of the menu to change again(to it original image) and only then, so i thought how i'm i going to do this; I thought of checking to see if the sub menu was visible and this is the code:

function outHeaderImageMenu(image)
{
if (document.getElementById(image).style.visibility=="hidden")
document.btec.src = "BTEC1.gif";
}

but it does not work what i'm i doing wrong. because i'm checking if this is visible using its own onmousevent would this be visible until the code finished executing or not?.

that is why i asked the original question. because if so it will not work will it?

but i've tried it in the closeMenu function also and it does not work any ideas..

the pig..

[edited by: korkus2000 at 5:57 pm (utc) on Feb. 11, 2003]
[edit reason] widgetized url [/edit]

BlobFisk

1:29 pm on Feb 13, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



*bump*

Hi piggybank1974!

Out of curiosity - have you tried putting the onMouseOut event into the <a> tag, as opposed to the <span> tag to see if it works?

HocusPocus

7:49 pm on Feb 13, 2003 (gmt 0)

10+ Year Member



If I was in your position, I would stick a static transparant layer over all the other objects and let that do all the event handling.

Or get a DHTML menu builder to sort out all the code, it can get very messy very quickly, esp with NN4 or <Selects>

Or Split the navs up, making sub pages, do away with DHTML and the Javascripts. Popup menus, rollover buttons et al can look quite cheesy. Concentrate on the Content.

piggybank1974

9:36 pm on Feb 15, 2003 (gmt 0)

10+ Year Member



hi bump and HocusPocus

Thanks for the replies.

I cannot remember if I've tried that, but i will. I will report back if it works or not.

HocusPocus whats this "If I was in your position, I would stick a static transparant layer(what?) over all the other objects and let that do all the event handling."

I'm I using Iframe or Layer or ILayer here?

The later two don't work with IE(stupid Microsoft) and Iframe hmhmhm! heres a question?

If l load my Iframe(not that i have one yet) in one frame (lets say the logo frame, this never gets changed) can i display it in another frame? anyway i though Iframes were over every layer and you could place them where you wanted in the browser (lets say half on one frame and half on the other?

the pig

andreasfriedrich

9:54 pm on Feb 15, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



piggybank1974 [webmasterworld.com] wrote at 09:36 AM on Feb. 15, 2003 in message #4 [webmasterworld.com]
The later two don't work with IE(stupid Microsoft) and Iframe hmhmhm!

I canīt see whatīs wrong with Microsoft not supporting some strange proprietary tags. Iīd agree with you wholeheartedly if the layer element was an element specified in the HTML standard but it is not.

[w3.org...]

Andreas