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;

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.