Click to See Complete Forum and Search --> : frames again(sorry)


jam
02-06-2006, 04:36 PM
how would i refer to one frames source from another frame??????


e.g.

<frameset cols="175,*">
<frame name="frame1" >>>src="jam.htm"<<<How would i refer to this />
<frame name="frame2" src="jam2.htm"<<< from a script in this frame(jam2.htm) />
</frameset>
....
....
....

cbrookes
02-06-2006, 04:42 PM
actually you probably want to dynamically adjust the target webpage?

top.frames['frame1'].location.href = "http://www.abc.com";

let me know if this is not what you meant.

jam
02-06-2006, 04:44 PM
yerh thats it i've just bin up for a while nd my mind ent quite workin cheers.... Jam


i just wanted to know wether i can use this for an if statment in a script in the second frame.....

e.g.

if (top.frames['frame1'].location.href == "http://www.abc.com";){
document.getElementById('jam').style.color = "ff0000";
}


something like that.......would it work...if not what can i do to do this

cbrookes
02-06-2006, 04:50 PM
Sure you can. The script you wrote won't work though - you have a semi-colon too many inside your round-brackets.... :)

jam
02-06-2006, 05:01 PM
c told ya ma mind ent workin cheers tho