![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| ||||
| ||||
|
|
Using MSIE 5+ Heath writes: My problem deals with working with window objects between pages as follows: |
|
My Introduction page contains a link to my Action page. The onClick of that link creates a series of random numbers that are appended to the end of the url of the Action page. After initiating the link the URL of the Action page looks like this: http://Action.htm?61,65,24,22 etc x 16. Now a user chooses two of those numbers, say 61 and 24, from the Action page and they are sent to a Pop-Up page. |
|
On the Pop-up page the user has to choose between the two numbers, say he or she chooses 61. **How do I get that number, 61, back to the Action page?** |
|
Normally I would create an object like var ActionPage = window.open("Action.htm", "Action"), but that won't work because of the random Numbers. |
#3
| |||
| |||
|
|
My problem deals with working with window objects between pages as follows: Your Subject line was poorly chosen, since it gives the impression that you are having trouble with the Math.random() method. It's true, but it all revolves around the problems I have in |
|
My Introduction page contains a link to my Action page. The onClick of that link creates a series of random numbers that are appended to the end of the url of the Action page. After initiating the link the URL of the Action page looks like this: http://Action.htm?61,65,24,22 etc x 16. Now a user chooses two of those numbers, say 61 and 24, from the Action page and they are sent to a Pop-Up page. Is the "Pop-Up page" opening in a new window, as the name seems to imply (we've already been fooled once)? If so, that Window can refer back to the Action page via it's "opener" attribute. |
|
I don't see how it will help, but you can use variables in the window.open() call, or you can create the URL as a variable: var sep="?"; var URL="Action.htm"; for(var i=0;i<16;i++){ URL+=sep+Math.floor(Math.random()*100); sep=","; } var ActionPage=window.open(URL,"Action"); |
#4
| |||
| |||
|
![]() |
| Thread Tools | |
| Display Modes | |
| |