[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [Sheflug] One for the perlmonks
> How do I redirect to another web page with the target frame
> being other than the current frame?
>
> I currently have the line
> print("location:$Redirect\n\n");
> in my script and need to know where to put the equivalent of
> "target='some_frame'"
>
I think the point is that you can't redirect at header level *and*
specify the frame. I suspect that's the difference between http and
html. All I can think you could do is redirect at frame level which is
probably not what you want or force a different top level document to
load.
Thus, I think it's outside the http protocol capabilities.
Scriptasylum.com suggests doing something like this though:
<script language="javascript">
if(self.location==top.location)self.location="index.html?page1.html";
</script>
The idea being that on your redirect header, you included the document
you actually wanted to load, and probably the frame. Then, in
javascript, you worked out the actual frame you wanted to go to and
reloaded the document in that.
I think it would work something like:
User clicks on link in frame (which actually is the current document in
the current frame). Redirect comes in with a querystring, but actually
delivers the same page the viewer is looking at.
The query string for this page is parsed in JS and from that, the
destination frame and page is determined and updated. The current page
continues as normal. To avoid doing all this in the current page, you
could, I suppose, do it in a hidden frame so the user wouldn't have to
put up with the current visible page updating.
Does this make sense?
> Can anyone help?
Probably not :-)
--
David
___________________________________________________________________
Sheffield Linux User's Group -
http://www.sheflug.co.uk/mailfaq.html
GNU the choice of a complete generation.