SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member
    Join Date
    Jan 2002
    Posts
    7
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    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

  2. #2
    SitePoint Enthusiast
    Join Date
    Apr 2002
    Posts
    75
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You need to declare username as a variable in the popup window.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •