put the code to handle the mechanics of reading the document cookie
and setting the user's home page in the base window for the site.
that way, all the other sub-documents can refer to that body of code
without having to declare it themselves.
<!doctype html public "-//w3c//dtd html 3.2 final//en">
<html>
<head>
<title>base page</title>
</head>
<script language="JavaScript">
HOME_PAGE = 'http://www.yahoo.com/';
function home_page () {
top.frames[1].location = HOME_PAGE;
}
function set_page (target) {
HOME_PAGE = target;
home_page();
}
</script>
<FRAMESET cols="20%,80%">
<FRAME SRC=one.html name="left">
<FRAME SRC=two.html name="right">
</FRAMESET>
<body>
</body>
</html>
you'll need a more elaborate set of functions than i've defined here..
these just store the chosen URL in a global variable and load that
page on request. you'll probably want one function that takes a URL
and packs it up in a way that can be stored in a cookie, and another
that does the corresponding unpacking.
to set a home page, call the function set_page() with a URL as the
argument. this can be done with <form><input> objects, or normal
links, using the syntax:
<a href="generic.html"
onClick="top.set_page ('http://www.almonte.com/');"
>set almonte</a>
or, more generally:
<a href="generic.html"
onClick="top.set_page (window.location);"
>set this page</a>
for each page.
to finish off the set, the page which is loaded into the main frame by
default should look like so:
<!doctype html public "-//w3c//dtd html 3.2 final//en">
<html>
<head>
<title>main frame</title>
</head>
<body bgcolor="#ffffff">
<script language="JavaScript">
top.home_page();
</script>
</body>
</html>
which will automatically trigger a load of whatever home page is
identified.
mike stone <[EMAIL PROTECTED]> 'net geek..
been there, done that, have network, will travel.
____________________________________________________________________
--------------------------------------------------------------------
Join The Web Consultants Association : Register on our web site Now
Web Consultants Web Site : http://just4u.com/webconsultants
If you lose the instructions All subscription/unsubscribing can be done
directly from our website for all our lists.
---------------------------------------------------------------------