Closed Thread Icon

Topic awaiting preservation: DHTML dropdown 'hanging around' Pages that link to <a href="https://ozoneasylum.com/backlink?for=8271" title="Pages that link to Topic awaiting preservation: DHTML dropdown &amp;#039;hanging around&amp;#039;" rel="nofollow" >Topic awaiting preservation: DHTML dropdown &#039;hanging around&#039;\

 
Author Thread
lonesculler
Obsessive-Compulsive (I) Inmate

From: London, UK
Insane since: Aug 2002

posted posted 08-21-2002 20:16

Dear all, I've been testing the limits of my patience with some interactive menus for the site www.sportspsychologist.co.uk/ ...this is a 'test' site for me and is being done as a favour. I've been using scripts for elements I would have done in Flash, to make it more cross-browser compatible. However I am having sticking problems...things like the roll in header only works in my browser if I use the back button to get to the page, and the drop down mwnu elements either hang around or disappear as the cursor moves in and out of the highlighted main menu boxes. I'm using CSS and find the effects I can produce are quite 'sorted' but I'm at a loss with the Javascript....

Any help/pointers/guidelines would be appreciated.

Thanks,

Anna


[fixed URL... -doc-]

[This message has been edited by DocOzone (edited 08-21-2002).]

kuckus
Bipolar (III) Inmate

From: Berlin (almost)
Insane since: Dec 2001

posted posted 08-21-2002 21:11

Welcome to the Asylum, lonesculler!

Right now you're calling the function that moves the header 40 msecs after the JavaScript part of the page has been loaded, but at that time the HTML code that contains the div you want to move has probably not yet been loaded, and that's why it doesn't move when you first visit the page (if you come back to it later the browser loads it from its cache which is much faster and then finds the div after 40 msecs).

What you need to do instead of

if (document.getElementById&#0124; &#0124;document.all)
start=setInterval("animatein()",40)

is this:

onload=animatein()

and then put the browser check into the animatein() function. That way, the function will be executed right after the whole page is loaded and all divs are in place.


I think that you should be able to solve the problem with the menus by calling the menuSetUp(...) function not only onmouseover but also onmouseout, like this:

<a href="index.html" class="SPitemAnchor" onMouseOver="menuSetUp('listBackground', 'firstMenu'); return false;" onmouseout="menuSetUp('listBackground', 'firstMenu'); return false;">background</a>

kuckus (cell #282)

lonesculler
Obsessive-Compulsive (I) Inmate

From: London, UK
Insane since: Aug 2002

posted posted 08-21-2002 21:46

Thank you for the response but it's a little more complicated than as you have suggested, with respect to the menu's...I think what is required is a detection that the onmouseover has occurred when the onmouseover is detected over the other elements of the menu. This is because the layer of the drop down menu is completely separate from the initial tab.

With respect to the interval I'm not sure how to put the browser detetion in the animate function given that there is a loop out to the start interval..

Thanks again.

« BackwardsOnwards »

Show Forum Drop Down Menu