PDA

Click to See Complete Forum and Search --> : anyone on the NS6 ill tip?


pnj
Feb 23rd, 2001, 12:44 PM
howdy
strange behavior w/ ns6 going on here.

onMouseover calls a function that swaps an image
onMouseout does the same thing but the image 'dissapears' instead of swaping.
the strange thing is if I put an alert box in the onMouseout function, i don't get the strange behavior.

here is a sample of the code
___________________________________
{d.writeln('<div id="NorthLayer" onMouseOut="OutImage(\'North\');hideMenu(\'NorthLayer\');" onMouseOver="showMenu(\'NorthLayer\');OverImage(\'North\');">');}
___________________________________

the OutImage() function

_______________________________________
function OutImage(pic) {
//onMouseOut release button
if (document.images && (preloadFlag == true))
{ //check for images
//alert("mouse out image");
document.images[pic].src = eval(pic + "_out.src"); //swap current "over" image for "out" image
}
}
________________________________________________________

i've never seen this before. this is in NS6 , in IE5 it works fine.

let me know if you need more info.

anyone???

thanks

sail3005
Feb 24th, 2001, 12:44 AM
as far as i can see, you are referencing the 'div' improperly.


document.images[pic].src = eval(pic + "_out.src"); //swap current "over" image for "out" image


should be


document.divName.document.images[imgNumberInArray] = whatever.



Treat each layer like its own document.

pnj
Feb 24th, 2001, 11:57 AM
that's weird
I'll give it a try thanks

what's weird is 'sometimes' it works properly
then,at random, it acts funny with the disapearing act.


thanks