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 ...
- 02-10-2009 #1
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
- 02-13-2009 #2Linux 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');


Reply With Quote