Click to See Complete Forum and Search --> : Lost variable


arturion
08-18-2003, 02:55 PM
I have a window where i defined a variable.

The problem is that in the code of the window, I give instructions to make a new page, in the same window!!! using new_window=window.open();

then, if in the new page I want to call the old variable, it dissapeared.

Is there a way to keep variables???

David Harrison
08-18-2003, 03:34 PM
Sure just put this:

new_window.document.writeln('<script type="text/javascript">');
new_window.document.writeln('var the_variable='+the_variable+';');
new_window.document.writeln('</script>');