Find the answer to your Linux question:
Results 1 to 2 of 2
So here is my scenario, I'm attempting to send some user data to a URL, with out using a forum, so that i can use that data for player names ...
  1. #1
    Linux Newbie dalinux_n00bie's Avatar
    Join Date
    Nov 2006
    Posts
    226

    Javascript GUP help

    So here is my scenario, I'm attempting to send some user data to a URL, with out using a forum, so that i can use that data for player names for a game that pops up in a new window when i push the play button.

    Is this the correct way todo it?

    HTML Code:
     <p class= "button1"> <button type="button" onClick="window.open('connect-4.html','connect4','top=100,left=100,width=575,height=400');playerone=document.getElementById(text1); playertwo=document.getElementById(text2);">Play!</button> </p>
    "Do or do not...there is no try" -Yoda
    History is a set of lies agreed upon by the winners.
    Linux is user friendly, not idiot friendly.
    Linux User 437442

  2. #2
    Linux User
    Join Date
    Jan 2006
    Posts
    414
    You're trying to pass these to the child window?
    playerone=document.getElementById(text1); playertwo=document.getElementById(text2);

    from the child window just do:
    var playerOne = window.parent.contentDocument.getElementById('text 1');
    var playerTwo = window.parent.contentDocument.getElementById('text 2');

Posting Permissions

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