PyraX Posted February 4, 2008 Share Posted February 4, 2008 I need a script that allows me to change the values of 3 textboxes when I change a radio button Thanks in advance PyraX Quote Link to comment Share on other sites More sharing options...
phpQuestioner Posted February 4, 2008 Share Posted February 4, 2008 <script language="javascript"> function showDetails(val1,val2,val3) { document.getElementById('txt1').value = val1; document.getElementById('txt2').value = val2; document.getElementById('txt3').value = val3; } </script> <input type="checkbox" onclick="showDetails('Put Value 1 Here','Put Value 2 Here','Put Value 3 Here')"> <br><br> <input type="text" id="txt1"><br> <input type="text" id="txt2"><br> <input type="text" id="txt3"> Quote Link to comment Share on other sites More sharing options...
phpQuestioner Posted February 4, 2008 Share Posted February 4, 2008 Oops - Change the checkbox to a radio button - Sorry - My fault. Like So: <script language="javascript"> function showDetails(val1,val2,val3) { document.getElementById('txt1').value = val1; document.getElementById('txt2').value = val2; document.getElementById('txt3').value = val3; } </script> <input type="radio" onclick="showDetails('Put Value 1 Here','Put Value 2 Here','Put Value 3 Here')"> <br><br> <input type="text" id="txt1"><br> <input type="text" id="txt2"><br> <input type="text" id="txt3"> Quote Link to comment Share on other sites More sharing options...
PyraX Posted February 4, 2008 Author Share Posted February 4, 2008 Awesome, thanks phpQuestioner Quote Link to comment Share on other sites More sharing options...
phpQuestioner Posted February 4, 2008 Share Posted February 4, 2008 Your Welcome PyraX Quote Link to comment Share on other sites More sharing options...
rudy.siregar Posted February 8, 2008 Share Posted February 8, 2008 Thats working anyway.... I have an idea, how if we use 2 radiobutton and 1 dropdown list menu. When we choose one of the radiobutton and one of lists in dropdown list menu, the value in textbox will change. Can u give me, some code for this one, because i want to make a printing online web complete with calculator. U can see in this link : http://www.printingonline.com.au/OrderA4_booklet.php Pls teach me how to make this work?? Regards, Rudy Siregar Quote Link to comment Share on other sites More sharing options...
rudy.siregar Posted February 8, 2008 Share Posted February 8, 2008 hi, anybody can touch me in this case? Pls read mu meg before. thx. regards, rudy Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.