...

View Full Version : passing vars between windows



petergr
05-31-2004, 08:48 PM
Please help ma to solve this problem with Mozilla…
A have a code which works fine in IE and don’t work in Mozilla.
My code has to pass variables from window to window.
On the first window the code runs like tgis


function UserID(url) {
srchString = "T209753d1";
url += "?" + escape(srchString);
location.href = url;
}

On the second window I have this snippet to read data from the first window


function readData( ) {
var srchString = unescape(location.search.substring(1, location.search.length));
document.forms[0].hiddenfield.value= srchString;
}

What should be done in order that this code works also for Mozilla?
Thank you very much…..

Willy Duitt
05-31-2004, 10:48 PM
Try document.location or window.location

petergr
05-31-2004, 11:24 PM
Thank you Willy.
I figured it out.....
All I had to do is to clear cache....



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum