Expand|Select|Wrap|Line Numbers
- <html>
- <head>
- <script type="text/javascript">
- function setValue(id,set)
- {
- document.myform.getElementById(id).value = set;
- }
- </script>
- </head>
- <body>
- <form name="myform" action="button_submit.php" method="post">
- <input type="button" onclick="setValue('qu1','1')" value="set to 1" />
- <input type="button" onclick="setValue('qu1','2')" value="set to 2" />
- <input type="button" onclick="setValue('qu1','3')" value="set to 3" />
- <input type="button" onclick="setValue('qu1','4')" value="set to 4" />
- <input type="button" onclick="setValue('qu1','5')" value="set to 5" />
- <input type="button" onclick="setValue('qu1','6')" value="set to 6" />
- <input type="hidden" id="qu1" name="q1" value="0" />
- <input type="submit" value="submit" />
- </form>
- </body>
- </html>
any help would be greatly appreciated.