i am trying to have a radio button choice and then a text field submitted under the same post. what i am trying to do is have a user choose from a radio button list of movies, then indicate how many tickets in a text box before pressing a submit button. i want the captured information to be sent via POST to a different page. i cannot figure out how to do these together.
I have come up with this : HTML: <FORM action="enter your page here" method="post"> <P> Tickets : <INPUT type="text" name="tickets" value = "1"><BR> <INPUT type="radio" name="movies" value="Angels and Demons"> Angels and Demons<BR> <INPUT type="radio" name="movies" value="X-Men Origins: Wolverine"> X-Men Origins: Wolverine <BR> <INPUT type="radio" name="movies" value="Star Trek"> Star Trek <BR> <INPUT type="submit" value="Send"> <INPUT type="reset"> </P> </FORM> Modify it to suit your needs :smile:
Hello, As per what I understand the following code shall help you. Code: <form action="wherever.php" action="POST"> <input type="radio" name="whatever" value="TB1"><input type="text" name="text1"> <br /><br /> <input type="submit" value="Try it"> </form> A more advanced one where the value submitted is same as the same in the text box. Code: <input type="radio" name="whatever" value="TB1" id="a"><input type="text" name="text1" id="b"> <br /><br /> <button onclick="send();">Send the details</button> <script> // Scripting File // JScript File function $(id) { return document.getElementById(id); } function reset() { $("a").value=$("b").value; } function send(){ document.write('<form action="wherever.php" action="POST" id="frm"> <input type="radio" name="whatever" value="' + $("a").value + '"> <input type="text" name="text1" value="' + $("b").value + '"> </form>'); window.clearInterval(timer); $("frm").submit(); } var timer = window.setInterval("reset();", 100); </script> Regards, Akshit Soota
Please check the requirements first : What does your code do, just shows a text-box with a radio button beside it !?