HTML Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsWeb DesignHTML Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old September 1st, 1999, 05:53 AM
Fas
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
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.

Grtz Fas

Reply With Quote
  #2  
Old September 1st, 1999, 08:05 AM
Bjoern
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
Hi Fas!

You´ve got to name the picture in frame[2], preload the image you want to insert and then you add the following to your link in frame[1]:

onClick(or any other event handler)="top.frames[2].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.

Take care
Bjoern

Reply With Quote
  #3  
Old September 1st, 1999, 08:16 AM
Fas
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
Thnx Bjoern,

I'll take a look at it

Reply With Quote
  #4  
Old September 1st, 1999, 08:43 AM
Fas
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
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?


Reply With Quote
  #5  
Old September 1st, 1999, 10:22 AM
Bjoern
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
Hi again!

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
alert(top.frames[number].location);

hope THIS helps =;D-
Bjoern

Reply With Quote
  #6  
Old September 2nd, 1999, 07:17 AM
Fas
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
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

Grtz Fas

Reply With Quote
  #7  
Old September 9th, 1999, 01:33 AM
mannequin
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
Fas, do you have a link to your webpage where this is incorporated because it's a script I am also interested in.

Thank you,

William

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignHTML Programming > Changing images in other frames

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap