Onclick Location

admin

Administrator
Staff member
Hello there,<br />
<br />
I am trying to open a new page from a radio button using 'onclick'.<br />
<br />
Can anyone help me with advice to open the page in a new window?<br />
<br />
my code is:<br />
onClick= "location.href='http://lincolnshire.totaltennis.net'"<br />
<br />
can I use "target='_blank'" in some manner?<br />
<br />
thanks in anticipation.<br />
<br />
Allan<!--content-->Try:<br />
<br />
onClick= "window.open('http://lincolnshire.totaltennis.net');"<!--content-->This link will help you as it helped me. :)<br />
<br />
<!-- m --><a class="postlink" href="http://webdevfaqs.com/javascript.php#popup">http://webdevfaqs.com/javascript.php#popup</a><!-- m --> <br />
<br />
<br />
So it'll basically look like this:<br />
<br />
onclick="window.open(this.href,'child'); return false;"<!--content-->Thanks guys for the help!<br />
<br />
I've sorted out:-<br />
<br />
<input type="radio" name="fixtures" value="http://lincolnshire.totaltennis.net" onClick="window.open(this.value);return false"><br />
<br />
which nicely separates the URL from the rest of the code and will allow me to update more easily....<br />
<br />
regards<br />
<br />
Allan<!--content-->
 
Back
Top