PDA

View Full Version : simple Jscript redirect changes


big_pimp
06-25-2003, 10:52 PM
Hi I have a site in frames please don't ask why to long to explain the reason i need this, but basically there is no other option open to me.. what i basically need to know is this:

I have a left hand frame and a main frame how would i use a simple javascript redirect to leave the left frame as it is but to redirect the main frame.. but i need to do this from the left hand frame.. again would take to long to explain why..

the main frames name is MAIN could anyone tell me how to adapt

<code><SCRIPT language="JavaScript">
<!--
window.location="http://someplace.com";
//-->
</SCRIPT></code>

so it will redirect the main frame and not the frame it is in


all help for this sad n00b would be greatly apreciated...

big_pimp
06-25-2003, 10:52 PM
lol didnt need <code> </code> tags afer all pls disregard them :)

Skyzyx
06-25-2003, 11:01 PM
parent.document.frames['main'].location.href='http://www.someplace.com';

big_pimp
06-25-2003, 11:10 PM
thanks for the reply it works perfectly, and i'm using w3schools like u said in ur signature lol but i just finished the html and css bits am gonna take a look at javascript now :)