Forum Moderators: mack

Message Too Old, No Replies

Redirect to a target frame?

         

jebarber

7:17 pm on Dec 5, 2003 (gmt 0)

10+ Year Member



I definetly fall into the category of new to web development, so forgive me if this is a really dumb question.

Basically i want to know if it is possable to use the Meta http-equiv tag to redirect a page to a certain frame on a frames page.

what I am trying to do is, whenever a certain page is loaded into one frame I want it to load another page into a differant frame.

What's the best way to do this?

Thanks for any help.

JamesR

11:36 pm on Dec 5, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I would say try loading that redirect code in the original target frame. Make the redirected URL the new frameset you want to display.

If I understand you correctly and that is what you want to do however, you will end up with a frameset inside a frameset. You will need some framebreaker code to pop out of the initial frame. Since I don't use frames, I don't have that code on hand, I am sorry.

daedalus

9:59 am on Dec 6, 2003 (gmt 0)

10+ Year Member



try javascript...
i think i get the idea of what you are trying to do. basically you want page "x", when loaded into frame "x" to automatically load a new page into frame "y".

javascript will do it easily. try javascripts.com for some free code to cut&paste

jebarber

1:24 pm on Dec 8, 2003 (gmt 0)

10+ Year Member



That's exactly what I want to do. I kind of thought JS would be the way to go. but I'm pretty new there too. I'll check out the site you mentioned and give it a try.

Thanks

BTW, I had thought of the frameset inside a frameset and have done that before. It works, it just isn't a very clean way to do things. I figured there has to be a better way.

jebarber

2:09 pm on Dec 8, 2003 (gmt 0)

10+ Year Member



I got it working.

Just in case someone is searching for how to do this, this is how I did it.

<script>
function reDirect() {
parent.frames.frameY.location.replace("pageY.html")
}
</script>

<body onLoad="reDirect()">

just replace frameY with the name of the target frame and pageY with the page you want loaded.