Evening all,
I'm trying to create a javascript loop to output a range of radio buttons numbered 1 to 10. This is part of a form, which will display the input on the next page.
So I have two problems. For testing only, I'd like to alert the value of the checked button. I'd then like to implement this so that it works in the usual way.
Here's what I have so far:
<li class="label">
With 0 being the lowest and 9 being the highest, how would you rate the redesign the site?
</li>
<li class="data">
<script type="text/javascript">
for(i = 0; i < 10; i++) {
document.write("<input type=radio name="overall" value="+i+"">"+i);
}
</script>
</li>
<a href="javascript:alert(document.getElementsByName.('overall').value);">Send the Feedback</a>
Can anyone suggest why this doesn't seem to work?
Thanks