Im trying to use the old code DDRtist gave to me in this thread...
Note: to test the code below easily use this form
This ALWAYS returns the same value, even if nothing is checked. Although this does work for inputs and stuff... Radio buttons seem to just send the value of the input, and not which input is checked.
How do I make it only return the value of the checked radio button?
Note: to test the code below easily use this form
Code:
<script>
function GenName()
{
var style = document.getElementById('get_style').value;
document.getElementById('changeme').innerHTML = style;
}
</script>
<input type="radio" id="get_style" name="style" value="xspf_player_slim.swf?song_url" checked="checked"/> MP3
<input type="radio" id="get_style" name="style" value="xspf_player.swf?playlist_url" /> XSPF
<BR><BR>
<input type="submit" onclick="GenName()" />
<div id="changeme"></div>
This ALWAYS returns the same value, even if nothing is checked. Although this does work for inputs and stuff... Radio buttons seem to just send the value of the input, and not which input is checked.
How do I make it only return the value of the checked radio button?