PDA

View Full Version : can I ad a target to; location="newpage.html"?


JavaRookie
10-14-2002, 12:00 PM
I've made a frameset in which there is a frame in which a simlple 'bypass' is used;

<SCRIPT LANGUAGE="JavaScript">

function bypass(){
location="newpage.html";
}
</SCRIPT>

and activate the 'script' with

<BODY onLoad="bypass()">

is it possible to open newpage.html in the "_top" target?

(of course it is, I only don't know how!)

requestcode
10-14-2002, 01:56 PM
If you want to load newpage.html over the frameset then you could try: top.location="newpage.html"

If you want to load newpage.html into another frame then it would be this: top.frame_name.location="newpage.hml"

You could also use "parent" instead of "top" and "frame_name" would be the name of the frame you want the new page to load into.

JavaRookie
10-14-2002, 02:10 PM
Thank you! Works fine!

Best Regards,

Java Rookie