Ta
Main Topics
Browse All TopicsWhats the syntax for the OnLoad handler.
I want to load a page into another target frame, and pass it a query string.
Also how do you do this with framesets
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Business Accounts
Answer for Membership
by: yes4mePosted on 2000-03-06 at 13:09:58ID: 2589093
First you got your main frame... something like (this is the very simplify version of what I will write):
<HTML><frameset rows="200%,*">
<frame src="first_frame.html" name="first_frame">
<frame src="second_frame.html" name="second_frame">
</frameset>
<noframes>
Whatever you want here to display if the user doesn't have frame
</noframes>
</BODY></HTML>
Then you got your first frame with the following code:
<HTML><BODY>
<a href="some_html.html" TARGET="second_frame"
</BODY></HTML>
Clicking on the link of the first frame will load a page into the second frame.
Now to pass the query string to the next frame, you need to use something completly different. You need to use cookies... and that's tough if you are not use to it. Well you need first to set the cookie... something like:
function setCookie()
{
var
the_name = prompt("What's your name?","");
var the_cookie =
"wm_javascript=username:" + escape(the_name);
document.cookie =
the_cookie;
alert("Thanks, now go to the next
page.");
}
and retrieve it later on using:
function readCookie()
{
var
the_cookie = document.cookie;
var broken_cookie =
the_cookie.split(":");
var the_name = broken_cookie[1];
var
the_name = unescape(the_name);
alert("Your name is: " +
the_name);
}
Of course, you need to place there function inside some javascript comments: <SCRIPT>... code here... </SCRIPT>