Forum Moderators: open
what I'm trying to do at the moment is to have 2 (or more) frames and make a layer to slide out. I know how to make the layer slide out. ok here's the tricky part. :
when mouse is over an image (lets say this is in 'frame1', I want a specific layer to slide out from a different frameset (maybe in 'frame2').
hmm maybe its simple but I cant figure it out. can someone tell me the javascript for this? thanks :)
You asked to look at a basic case, where you have two frames in a simple (not nested) frameset. You're writing a script within a frame with the name "frame1", and you want to address objects in "frame2". Then you can use top.frame2.objectName to address the objects in frame2 from frame1.
In this basic situation, it would be equivalent to use parent.frame2.objectName. But with "top" you're always sure you get to the top of the tree. That also makes your script much clearer if you need to come back to it later on, so I prefer to use "parent" only if the intention is to go up one level.