Reputation: 455
I want to make sure that if a user clicks the button that opens a new window, that window is maintained if they click the button again. Meaning that I want the user to be able to hold multiple copies of the same window open even when opening new (of the same) ones.
At the moment I have this:
onclick="window.open('file.php?game=0', 'newwindow' , 'width=920,height=740', 'resizable=0')
and I read another thread on here that I could just add a counter.
I did so with
$counter = 0; and then put , 'counter++$apos;,
as an argument but that fails to load the entire page.
What am I missing?
Upvotes: 0
Views: 90
Reputation: 944556
$counter
is a variable … but it looks like a PHP variable.
'counter++'
is a string literal.
If you want a new window each time you run the script, just use the name _blank
. There's no point to giving the window a name of its own unless you want to open multiple links in the same window.
Upvotes: 1