September 1st, 1999, 05:53 AM
I'm having trouble when I want a link in a menu in frame1 to trigger an Image roll-over in another frame.
In my page, the user can go to the selected item by clicking on it's link in the main menu. After following this link the image in another frame should change, but all that I'm getting is a JScript 'not defined' error. ( I've put all my roll-over images in an array)
Please give me an example how to make an onclick event that changes an image in another frame.
September 1st, 1999, 08:05 AM
You´ve got to name the picture in frame, preload the image you want to insert and then you add the following to your link in frame:
onClick(or any other event handler)="top.frames.document.images.your_image_name.src = second_image_name.src;"
This is not the best solution though. I´d preffer to make a funktion you can call when clicking on the link. As to the frameset: I think here is your real problem. You´ve got to work out how to reference the image through the frames-tree. Nameing your frames in the frameset might help a bit there.
September 1st, 1999, 08:16 AM
I'll take a look at it
September 1st, 1999, 08:43 AM
Again I get an Error when using the above method. As you suggested, Bjoern, I already preloaded all images in the top document (frameset), but for some reason those definitions won't be 'transferred' through the tree.
The error I get this time, is that the name of the frame I use isn't defined, although the fact that I've named the frame in the frameset??
In what why can a frame be declared in another frame?
September 1st, 1999, 10:22 AM
Try numbering the frames instead of using the names. Maybe that works better
top.frames[number].document.images.src = ..
if you´ve got more frames and you´re not sure wich is the right number get the location of the frame
hope THIS helps =;D-
September 2nd, 1999, 07:17 AM
Have it fixed now!
I had a picture named the same as the frame... not very smart of course but such things can happen...
thnx anyway Bjoern
September 9th, 1999, 01:33 AM
Fas, do you have a link to your webpage where this is incorporated because it's a script I am also interested in.