Closed Thread Icon

Topic awaiting preservation: rollover question.. 2 html doc's (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=8018" title="Pages that link to Topic awaiting preservation: rollover question.. 2 html doc&amp;#039;s (Page 1 of 1)" rel="nofollow" >Topic awaiting preservation: rollover question.. 2 html doc&#039;s <span class="small">(Page 1 of 1)</span>\

 
Raptor
Paranoid (IV) Inmate

From: AČ, MI, USA
Insane since: Nov 2001

posted posted 01-09-2002 04:46

ok.. i have an html document (page1) with an image in it. in this html document is an iframe, with another html document (page2) inside. is it possible for me to rollover an image in page1 to correspond with a rollover in page2?

btw i'm not too good w/ javascript/dhtml, if that's what it takes. so if it's js/dhtml heavy, explain it a bit for me please i've taken c++ so i do understand some of js/dhtml too.


bitdamaged
Maniac (V) Mad Scientist

From: 100101010011 <-- right about here
Insane since: Mar 2000

posted posted 01-09-2002 06:11

Yes.

you just need to do a bit of refrencing.
The easiest way is to name the iframe

<iframe name=textbody src=....

Then call the image inside it like this:
top.textbody.document.imageName.src = "new gif"

Where the top.textbody refers to the frame and the rest is whatever code you are using for your mouseovers.

IMPORTANT NOTE: This will only work as long as the docs are off the same domain.





:[ Computers let you make more mistakes faster than any other invention in human history, with the possible exceptions of handguns and tequila. ]:

Raptor
Paranoid (IV) Inmate

From: AČ, MI, USA
Insane since: Nov 2001

posted posted 01-09-2002 06:24

very cool. i'll give it a shot when i finish up in photoshop. thanks for the reply bitdamaged

Of course you're entitled to your own opinion.
Who said I have to agree with it?

Slime
Lunatic (VI) Mad Scientist

From: Massachusetts, USA
Insane since: Mar 2000

posted posted 01-09-2002 06:25

*only* use top.framename.document... if your page is at the top level. If the IFRAME you're referencing is a part of the page that the script is being run in, simply use framename.document... .

bitdamaged
Maniac (V) Mad Scientist

From: 100101010011 <-- right about here
Insane since: Mar 2000

posted posted 01-09-2002 19:03

Yeah the top thing is just a way to start at the top page and work down. The real difficulty in this type of situations is getting the right refrence to the frame. If you are just talking about one page with an iframe then Slime's method is the way to go.



:[ Computers let you make more mistakes faster than any other invention in human history, with the possible exceptions of handguns and tequila. ]:

blu
Nervous Wreck (II) Inmate

From: San Antonio, TX, USA
Insane since: Jan 2002

posted posted 02-05-2002 04:54

ok... going along with this problem. what if you're trying to do the opposite... i have a main page (page1) and an iframe inside of it that has page2 in it. can i click something in page2 and make a graphic on page1 change? how? i need to do this for a page that's due on the 14th so any help would be great =) thanks guys!

-------
*blu*
fireshock4@earthlink.net
http://fireshock.midaszero.net

« BackwardsOnwards »

Show Forum Drop Down Menu