Home Articles FAQs XREF Games Software Instant Books BBS About FOLDOC RFCs Feedback Sitemap

Q377 How can I access the value of a variable set on a different page - when I have to go through an intermidate page first?

You are here: irt.org | FAQ | JavaScript | Link | Q377 [ previous next ]

Use a frameset with a hidden frame:

<FRAME SRC=page1.htm">
<FRAME SRC="blank.htm">

Store the variable in the parent frame:

<SCRIPT LANGUAGE="JavaScript"><!--
var myname='me';
parent.myname = myname;

When the 2nd page is loaded access the variable in the parent frame.

<SCRIPT LANGUAGE="JavaScript"><!--
var myname = parent.myname;

©2018 Martin Webb