-
passing a variable t...
I need the most efficient way of passing a variable from a parent window to a popup window.
The reason i say "most efficient" is because i currently do it like this from the parent:
var uploadWin = window.open("Buttons.htm",null,options here);
uploadWin.username= "jay242";
then from the popup window, i can alert it:
var stringUser = this.username;
alert(stringUser)
But this is inefficient because at times it randomly alerts "undefinded"
I have no idea why. Does anyon?
Anyways, can someone tell me a more fail safe way to pass a var to a popup so that i will be able to access it 100% correctly.
jay
-
SitePoint Enthusiast
You need to declare username as a variable in the popup window.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
Bookmarks