Click to See Complete Forum and Search --> : body script disabled my rollovers.


xchrisx
04-25-2003, 10:50 AM
When i added a dynamic scroller script to these pages http://www.freeminddesigns.com/projects/fgh/news.html
and http://www.freeminddesigns.com/projects/fgh/bio.html
it ended up disabling my rollover scripts. I designed the page with image ready, i don't use it much but i thought i would give it a try this time. I usually use fireworks. But can you give me any suggestions on how to solve this problem so i can have both the scroller and the rollover scripts to work at the same time.

Thank you

havik
04-25-2003, 11:00 AM
I've looked at your code and found out that it has to deal with your onload events.

you have this:
<body ... onload="preloadImages()">

and this is found also within the script for the scroller:
window.onload=getcontent_height

unfortunately, onload events need to be coded together so this won't work.

You could try this:

<body ... onload="preloadImages(); getcontent_height();">

and remove this (window.onload=getcontent_height) from both pages.

See where that gets you and inform me of your status.

Havik

havik
04-25-2003, 11:08 AM
Also, you could do this:

create this function and place it in a script (preferably the first one)

function loadFuncs() {
preloadImages();
getcontent_height();
}

Then remove this (window.onload=getcontent_height) exactly like the post above and replace this:

<body ... onload="preloadImages()">

with this:

<body ... onload="loadFuncs()">

Havik

xchrisx
04-25-2003, 11:27 AM
Thanx, that worked perfectly! I knew it was something simple...

havik
04-25-2003, 11:30 AM
I knew it was something simple...

Most of the time it is. :D

Havik