HELP! Click radio button, go to URL

liunx

Guest
I'm going around in circles. I'd rather NOT do this in java but in something that is used by all browsers. I just want to display a list of radio buttons. When they click on a button (or click a SUBMIT button but it would be easier on them if it opens the new page when they just click the button), it opens a new window (target="_blank" ?)with the new page. I was trying to do it with FORM but I don't know... stuck.<br />
<br />
It doesn't have to open a new window but maybe that's best. Doens't really matter.<br />
<br />
I'd rather just use something in HTML if possible.<br />
<br />
---<br />
<br />
EDIT: Until someone tells me ;) I figured I could do it by using an image rather than a real radio button. I created this page -- <!-- m --><a class="postlink" href="http://www.dukewill.com/testform.html">http://www.dukewill.com/testform.html</a><!-- m --> (test page) and the images are smiley faces. I could not find a .gif image of a radio button but surely I can, eventually.<br />
<br />
If anyone knows a better way, help.<br />
<br />
The code I used for my work-around...<br />
<br />
<HTML><br />
<HEAD><br />
<TITLE>Song Examples, DukeWill.com</TITLE><br />
<style type="text/css"> <br />
<!-- <br />
body {font-family:Arial, sans-serif} <br />
--> <br />
</style><br />
</HEAD><br />
<BODY><br />
<CENTER><br />
<TABLE><br />
<TR><br />
<TD><FORM ACTION="http://www.dukewill.com/forum/viewtopic.php?t=4" METHOD=GET> <br />
<input border=0 type="image" src=http://www.webdeveloper.com/forum/archive/index.php/"images/icon_biggrin.gif" ALT="Click me"></FORM></TD><br />
<TD>&nbsp;A love gone right song</TD><br />
</TR><br />
<TR><br />
<TD><FORM ACTION="http://www.dukewill.com/forum/viewtopic.php?t=5" METHOD=GET> <br />
<input border=0 type="image" src=http://www.webdeveloper.com/forum/archive/index.php/"images/icon_biggrin.gif" ALT="Click me"></FORM></TD><br />
<TD>&nbsp;A love gone wrong wong</TD><br />
</TR><br />
</TABLE><br />
</CENTER><br />
</BODY><br />
</HTML><br />
<br />
When I click on the smiley face, it DOES take me to the URL. I'm getting an error saying "page does not exist." Have no clue why that is happening but I guess it has nothing to do with my HTML... something on my forum I guess.<!--content-->You could do this:<br />
<br />
<form name="w3c" action="http://www.w3.org/" method="post"><br />
<input name="gotow3c" type="submit" value="Go to W3C"><br />
</form><br />
<br />
<form name="caulolli" action="http://www.w3.org/" method="post"><br />
<input name="gotocaulolli" type="submit" value="Go to Caulolli"><br />
</form><br />
<br />
but unfortunately, opening in a new window would only be a distant dream with this method.<!--content-->Uh, I'm trying to use radio buttons. What you did will work and the method I am using above will work... if I could find a radio button .gif file, it would look like radio buttons. But if I can use "real" radio buttons... when they click a radio button, it opens a new URL, that's what I'm trying to do... NOT use a SUBMIT button.<br />
<br />
Originally posted by lavalamp <br />
You could do this:<br />
<br />
<form name="w3c" action="http://www.w3.org/" method="post"><br />
<input name="gotow3c" type="submit" value="Go to W3C"><br />
</form><br />
<br />
<form name="caulolli" action="http://www.w3.org/" method="post"><br />
<input name="gotocaulolli" type="submit" value="Go to Caulolli"><br />
</form><br />
<br />
but unfortunately, opening in a new window would only be a distant dream with this method.<!--content-->I did some screen shots and look what came out:<!--content-->Thanks, I used one. In about middle of the page at <!-- m --><a class="postlink" href="http://www.dukewill.com/go.html">http://www.dukewill.com/go.html</a><!-- m --> (site I am working on).<!--content-->Happy to help. :)<!--content-->Originally posted by lavalamp <br />
unfortunately, opening in a new window would only be a distant dream with this method. Not at all... You just use the target attribute:<br />
<br />
<form name="w3c" action="http://www.w3c.org/" method="post" target="_blank"> <br />
<input name="gotow3c" type="submit" value="Go to W3C"> <br />
</form><!--content-->Really? i didn't kow you could do that with forms.<!--content-->Yes, you can do it, but it has a very definite downside. It won't validate 4.01 Strict. You'll have to use Transitional...<!--content-->That's because opening new windows is bad, apparently.<!--content-->Yeah, I think it's because of accessibility issues.<!--content-->
 
Back
Top