Click to See Complete Forum and Search --> : Framed Links HTTP - JAVASCRIPT


dcjones
01-07-2003, 08:02 AM
Hi all,

Any ideas on this one please.

PAGE 1. I have a site which uses FRAMES. In one of the FRAMES I have a link to a external site.

PAGE 2. I have another page which is FRAMED, TOP FRAME and BOTTEM FRAME.

I want the link on PAGE 1 to open PAGE 2 with the external site loaded into the BOTTEM FRAME.

How do I do this.


Dereck

khalidali63
01-07-2003, 08:13 AM
You probably can do this if the other frame where you want the external page to be loaded is openend from the parent using window.open() JavaScript.
In this case you can ,am prety sure, direct the link to open in the child windows frames.

Khalid

dcjones
01-07-2003, 08:18 AM
Hi and thanks for your reply,

I am still trying to understand what you wrote. I am no expert when it comes to javascrits. Any futher comments would be helpful.


Many thanks


Dereck

khalidali63
01-07-2003, 08:47 AM
oooooops

Charles
01-07-2003, 09:38 AM
JavaScript is a way bad way to go here. Keep in mind that it will fail one in ten times and next to it there keep that it is way easy to do this with plain old HTML. See http://www.w3.org/TR/html401/interact/forms.html for the low down.

khalidali63
01-07-2003, 09:52 AM
Outta curiosity

Keep in mind that it will fail one in ten times and next to it there keep that it is way easy to do this with plain old HTML.


The post above says that it has 2 independent pages
both with frames
Now what I'd like to know is that how will you reference another pages child frame?
Maneuvering amongs frames within a frameset I have done and seen,but I don't think I have ever done sending my request to some other page to display.
Can you please elaborate how?
Oh BTW nevermind if thats not this post what this thread originally required..:-)

Khalid

Charles
01-07-2003, 09:56 AM
I stand corrected; I mis-read the post.

The best way to handle the situation is to use a CGI script to resend a frameset to that other window.

dcjones
01-07-2003, 11:55 AM
Hi all,

Charles, Forgive me for saying this but you comments are not much help. Can you explain why I would need to use a CGI script to pass a variable from one page to another.

What I am trying to do is, when a link to an external site is clicked on for the external site to be displayed in a new window with the top frame of the window displaying the Logo and site info of my site informing the user who to get back to my site.

Similar to the way it works in HOTMAIL.COM

Can you help in any way without just pointing me to a techi document or making a short statement,


Regards and thanks in advance.

Dereck

Charles
01-07-2003, 12:09 PM
#!usr/local/bin/perl
use CGI qw(header param);
my $url = param('url');
print header <<EOQ;
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN"
"http://www.w3.org/TR/html4/frameset.dtd">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>My Happy Frameset</title>
<frameset rows="25%,*">
<frame src="topframe.html">
<frame src="$url">
<noframes>
<p><a href="$url">$url</a></p>
</noframes>
</frameset>
EOQ

dcjones
01-07-2003, 12:39 PM
Thank you Charles,

I will give your script a try.

Many thanks

Dereck