Passing Data Between Web Pages

Change Documents

Change the document though JavaScript and leave the cookies loaded.

document.location.href = "new_app.html";
 

Pass the Cookie to the Other Page

document.cookie = 'name=Geroge Washington; path="new_app.html"; expires=Monday, 31-Dec-01 11:11:11 GMT';
 

Pass Data Though Frames

<html>
<script language=JavaScript>
  <!--
  var GlobalVar;
  // -->
</script>
<frameset cols=50%,50%>
<frame name="left" src=app1.htm>
<frame name="right" src="app2.htm>
</frameset>
</html>
 

Either app an reference the variable by:
document.top.GlobalVar

Pass Data Though the Page's URL

The window.location.search variable contains the part of the page address following the ?.   An '&' is used to separate parameters.  An example can be found in param.html.



Last Updated: $Date: 2003/11/11 08:12:50 $ GMT ($Revision: 1.2 $)