Click to See Complete Forum and Search --> : Referring frame


Bela
01-13-2003, 12:12 PM
hey guys, i wanted to have my links on the right frame.
Heres some of my code ...

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<html>

<head><!-- netlogis caritas home down payment assistance, grant to purchase a house -->
<title>NetLogis Caritas--Providing FREE Down Payment Assistance Nationwide (USA and Canada) - Zero-Down to buy your house</title>

<meta name="robots" content="index, all">
<meta http-equiv="KEYWORDS" content="zero-down, 105% financing, 100% cltv, closing costs">
<meta http-equiv="DESCRIPTION" content="Zero-Down! FREE Down Payment Assistance for Homebuyers Nationwide (USA and Canada). NetLogis Caritas will gift up to 50% 0f the purchase price. The funds provided to Buyers by The NetLogis Home Grant Program are a true Gift. No lien and NO expectation of repayment!">

<meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

<base target="right">

</head>

<!-- frames -->
<frameset rows="34%,66%" cols="*" frameborder="NO" border="0" framespacing="0">
<frame name="netlogishead" scrolling="NO" noresize src="netlogishead.html" marginwidth="0" marginheight="0" frameborder="NO" >
<frameset cols="24%,76%" rows="*" frameborder="NO" border="0" framespacing="0">
<frame name="netlogisnav" noresize scrolling="NO" src="netlogisnav.html" marginwidth="0" marginheight="0" frameborder="NO">
<frame name="right" noresize scrolling="AUTO" src="intro.html" marginwidth="0" marginheight="0" frameborder="NO">

<noframes>

<body>
<p>
Frames are not working with your Browser.<br><br><br>
You can reach the respective pages on the frames via these links<br><br><br>
<a href="netlogishead.html">Navigation - TopMenu</a><br><br><br>
<a href="netlogisnav.html">Navigation - LeftMenu</a>
</p>
</body>

</noframes>

</frameset>
</frameset>

</html>


When i send an email the following link opens "tour.html" with NO frame at all:
<A href="http://www.netlogiscaritas.com/tour.html" target="right">tour</A>

And when i send an email the following link opens only "index.html":

<A href="http://www.netlogiscaritas.com" target="right">tour</A>

What i am looking to do is to have my link open FIRST the "index.html" with ALL 3 frames THEN load "tour.html" in the right frame (with the left and top frames also open).

Anybody can help ?

Thanks in advance for your time and for sharing your know-how

Bela

sinhart
01-13-2003, 01:22 PM
If I am understanding you correctly what you might be able to do is to open with your index.html in a frameless window.
Then when the link is clicked have the link pointing to the frameset page where you can specify what loades into each frame.Also, within a frame, you can load a new frameset with target="_parent" to reload the new frameset over the original frameset.

pyro
01-13-2003, 01:23 PM
I think the answer to what you are looking for is in this thread.

http://forums.webdeveloper.com/showthread.php?s=&threadid=2197

Swon's meathod (second post) is the best bet if you have PHP, if not, my first post (third post) tells how to do it with javascipt.

sinhart
01-13-2003, 01:37 PM
If I am understanding you correctly what you might be able to do is to open with your index.html in a frameless window.
Then when the link is clicked have the link pointing to the frameset page where you can specify what loades into each frame.Also, within a frame, you can load a new frameset with target="_parent" to reload the new frameset over the original frameset.

Bela
01-13-2003, 03:39 PM
Thank you to both of you for your quick reply

Sinhart, I am not sure what i have missed. Maybe the best way to understand my problem, and to see if you can help, is to try this:

1- assume that my website (www.netlogiscaritas.com ) has no problem. In fact at my website i have no problem to open a page in the RIGHT frame ALONG WITH the Top and the Left frames. The problem is to have an OUTSIDE link, referring to a specific page, to open ALL 3 frames, with that specific page loading in the RIGHT frame.

2- First from your email program, prepare a new mail, type the above web address, save the email as draft, then click on the link: you'll see that all 3 frames open correctly, and my intro.html is loaded as it is supposed to in the RIGHT Frame.

3- Now please get back to your previous draft email and type the following
www.netlogiscaritas.com/tour.html save again the email as draft then click on this second link: you'll see the difference; this time tour.html is opened WITHOUT the Top and Left frames.

What i want is, FROM AN EMAIL, a way to open tour.html (or another page)ALONG WITH the Top and the LEFT frames.

Hope this clarify my problem

Thanks again for your time
Bela

pyro
01-13-2003, 03:44 PM
Did you take a look at the link I supplied above? Swon gavea method using PHP (recommended if your server supports php) and I gave a javascript method. This does exactly what you want.

Bela
01-13-2003, 10:08 PM
Thanks again for your reply

1- my server Earthlink.net supports Server-side Scripting, PHP4, Perl and CGI but not ASP.

2- I have tried the above 2nd post but it doesn't work. So i may overlooked something.
From my OutLook Express, I tried first <A
href="http://www.netlogiscaritas.com/tour.html" target=_parent>tour</A> which opens tour.html WITHOUT the Top and Left frames. This is not what i want.

Second try: <A
href="http://www.netlogiscaritas.com/tour.html" target=right>tour</A>
which also opens tour.html WITHOUT the Top and Left frames. This is not what i want.

2- how to modify the JavaScript ( http://forums.webdeveloper.com/show...=&threadid=2197
) to have my 3 frames (netlogishead (for the Top frame), netlogisnav (for the Left frame) and right (for the main frame)). I'll try it to see.

Hey tons of thanks for keeping up with me
Bela

pyro
01-13-2003, 10:49 PM
Since you have PHP, I would recommend going that method. If you need help, let us know.

sinhart
01-13-2003, 10:58 PM
Originally posted by Bela
Sinhart, I am not sure what i have missed. Maybe the best way ...

OK, now I understand. Try this little nifty I got from javascript.internet.com. It goes in the head of any page you want to open in the parent frameset. It forces the frameset to open so there may be a problem if the page you are linking to in your email is not one of the pages described in the frameset.


<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
if (parent.location.href == self.location.href) {
// change the url below to the url of the frameset page
window.location.href = 'index.html';
}
// End -->
</script>

pyro
01-13-2003, 11:03 PM
That won't do what he wants. All that will do is open his index page, not open the page he wants in his frameset. He needs to use either swon's php method, or my javascript method to do that.

Bela
01-14-2003, 08:51 AM
hello again

I have 2 questions for the Javascript method

1- visitors with no java enabled will they be able to browse my site ?

2- Your script seems to be for 2 frames and my site has 3 frames. What do i need to do ?

Thanks
Bela

swon
01-14-2003, 09:44 AM
Hi Bela, that's pyro's script:

code:--------------------------------------------------------------------------------
<script type="text/javascript">
<!--Hide
linkURL = "homepage.html" //set the default URL to load if there was no referrer
if (top.location.href) { //to be compatible with IE use top.location.href instead of parent.document.URL
pageURL = top.location.href //set the top.location.href to parentURL
if (pageURL.indexOf('?') != -1) { //Check for the referring page
linkURL = pageURL.substring (pageURL.indexOf('?')+1, pageURL.length) //parse the top.location.href to remove everything before the ?
}
}

document.write('<FRAMESET ROWS="67,*,35" Border=0>')
document.write('<FRAME SCROLLING=NO NORESIZE SRC="top.html" NAME="top">')
document.write('<FRAME NORESIZE SRC="' + linkURL + '" NAME="homepage">') //this is the frame that the content is loaded into
document.write('<FRAME SCROLLING=NO NORESIZE SRC="address.html" NAME="address">')
document.write('<\/FRAMESET>')

//End hide-->
</script>
--------------------------------------------------------------------------------

For 3 frames, you have to add a 3rd document.write() with your new frame-definition within.

Bela
01-14-2003, 10:05 AM
Hello again
I am amazed by the speed of your replies and your willingness to help newbies like myself.

What do you mean by adding a " 3rd document.write() with your new frame-definition within " when there is ALREADY 5 of such "document.write() " ? Do you mean a SIXTH one ?

Please have a look at my very post (above) and tell me what to change, add, take out or rename.

million thanks
Bela

swon
01-14-2003, 10:07 AM
Hi again, I've forgot to answer your first question.

If the user has javascript disabled, it wouldn't work, but that doesn't matter because they have on most sites problems, and some things, you can do only width javascript.
So my opinion, do it nevertheless if you need that function!

swon
01-14-2003, 10:12 AM
I saw that pyro's script has 3 frames!

for adding for example a 4th frame:

document.write('<FRAME SCROLLING=NO NORESIZE SRC="4.html" NAME="address">');

and put it between the two document.write(<frameset within) and then where you want to have it.

pyro
01-14-2003, 10:15 AM
Here it is..

document.write('<frameset rows="34%,66%" cols="*" frameborder="NO" border="0" framespacing="0">')
document.write('<frame name="netlogishead" scrolling="NO" noresize src="netlogishead.html" marginwidth="0" marginheight="0" frameborder="NO">')
document.write('<frameset cols="24%,76%" rows="*" frameborder="NO" border="0" framespacing="0">')
document.write('<frame name="netlogisnav" noresize scrolling="NO" src="netlogisnav.html" marginwidth="2" marginheight="0" frameborder="NO">')
document.write('<frame name="right" noresize scrolling="AUTO" src="' + linkURL + '" marginwidth="0" marginheight="0" frameborder="NO">')
document.write('<\/frameset>')
document.write('<\/frameset>')

Bela
01-14-2003, 12:04 PM
To all of you

I have used the above JavaScript and was ABLE to do EXACTELY what I was looking to do: Click on a link from an email and have it load a specific document in the Main Frame.

<A
href="http://www.netlogiscaritas.com?../../netlogisPDF/affiliatesAgree.html">Affiliate Agreement</A>

or

<A
href="http://www.netlogiscaritas.com?tour.html">tour</A>

(***** Sorry I am not trying to spam, but want only to leave some traces for few newbies with the same problem *****)

I have one last question on this subject: How to add the link to this thread on my Index.html page, without screwing "my" javascript ?

A way saying MILLION THANKS to all of you each time someone come to my site.

Whishing you all continued success
Bela

Bela
01-26-2003, 11:53 PM
Hello again to everyone

I am back. Using JavaScript for my index page, as recommended by Pyro and swon, has solved my referring problem. But we received many emails from people saying they couldn't access our site. I know the reason.

I want to keep "my" JavaScript AND put back my previous (Index) source code, is there some JavaScript to check if the visitor has a Java enabled Browser, IF NOT to skip the Pyro Script and resort to my old source code ?
Does it cause other problems ? and which ones?

Again thanks to all for your help
Bela
bbelaba@netlogiscaritas.com
www.netlogiscaritas.com