View Full Version : Changing an image from another frame
IK200
09-11-2002, 04:35 PM
Howdy...
Scenario:
2 Frames. When the user goes to a specific page in the site, the main frame must tell an image in the top frame to change to another image. (Not a random image, but a specific one.)
How do I do this?
Thanks (In advance :) )
<script language="javascript">
top.framename.images['imagename'].src = 'newimage.jpg';
</script>
IK200
09-12-2002, 07:38 AM
Hi
Will give it a try.
Thanks.
IK200
09-12-2002, 08:05 AM
Howdy....
It doesn't seem to want to work...
Any ideas?
Cheers
glenngv
09-12-2002, 09:17 AM
did you change to appropriate frame and image names?
<script language="javascript">
top.framename.images['imagename'].src = 'newimage.jpg';
</script>
IK200
09-12-2002, 09:43 AM
Howdy
Yip. I did.
<script language="javascript">
top.navig.images['pic01'].src = 'images/logo.jpg';
</script>
I placed this script in my bottom frame, and nothing happens.
It needs to change the pic in the top frame as soon as the bottom frame loads.
glenngv
09-12-2002, 09:54 AM
top.navig.document.images['pic01'].src = 'images/logo.jpg';
IK200
09-12-2002, 10:11 AM
Howdy...
Thanks so much. It works after I added in the .document part....
Thanks again...
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.