PDA

View Full Version : PLZ HLP! Sending Javascript between two frames.


Caleb
08-31-03, 04:53 PM
I'm sure it's possible to send javascript code from one frame to another, right?

What I have is a page with two iframes. One iframe is a seperate page with image links. The seccond iframe is supposed to show an image and a description of the links from the first iframe, when the link is hovered over with the mouse (onmouseover).

What I've come to conclude, is that I want to use:

onMouseOver="parent.frames['FRAME_02'].document.

I can easily show a different image to the second frame using:

onMouseOver="parent.frames['FRAME_02'].document.images[IMAGE].src='SOURCE'

but that only does half the job. I need to also show text underneath this image. and i can only assume that sending javascript from one frame to the other will help me out, but i do not know where to begin.

this is why i think javascript should be thrown around. (http://www.dynamicdrive.com/dynamicindex5/linkinfo.htm) but i can't seem to figure it out.

Any help would be much appreciated. THNX

Caleb
09-01-03, 01:20 AM
Wow! I got really bored at waiting to see if anyone could help. So I went ahead and figured it out. Took a long time, but i did it.

I decided that the link I provided would be a great way to do what I was trying to do. Went ahead and created the javascript variables in FRAME_01 and add the rest of the script into FRAME_02, and use:


parent.frames['FRAME_02'].JAVASCRIPT_FUNCTION


thanks alot guys. :)