lost23 Posted February 3, 2014 Share Posted February 3, 2014 I insert my code to make matrix radio button and i insert javascript code to obtain value in text box ( Estimated Total )problem is i want to obtain another value ( program name )so i want form send to ( value ) and ( program name )how ? </head> <script> function getChecked(){ for (var i=1;i<10;i++){ if (document.getElementById('radios_'+i).checked) { radiouttonvalue = document.getElementById('radios_'+i).value; document.getElementById('inputvalue').value = radiouttonvalue; } } } </script> <body> <table style="width: 700px;"> <tbody> <tr> <td> </td> <td><p><strong>4 person per room</strong></p></td> <td><p><strong>3 person per room</strong></p></td> <td><p><strong>2 person per room</strong></p></td> </tr> <tr class="bg_cell"> <td bgcolor="#b0f6b0"><strong>program 1</strong></td> <td bgcolor="#b0f6b0"><input type="radio" id="radios_1" name="ljudkalla" value="$7,195" onclick="getChecked()" /> $7,195</td> <td bgcolor="#b0f6b0"><input type="radio" id="radios_2" name="ljudkalla" value="$7,495" onclick="getChecked()" /> $7,495</td> <td bgcolor="#b0f6b0"><input type="radio" id="radios_3" name="ljudkalla" value="$7,995" onclick="getChecked()" /> $7,995</td> </tr> <tr> <td><strong>program 2</strong></td> <td><input type="radio" id="radios_4" name="ljudkalla" value="$7,495" onclick="getChecked()" /> $7,495</td> <td><input type="radio" id="radios_5" name="ljudkalla" value="$7,995" onclick="getChecked()" /> $7,995</td> <td><input type="radio" id="radios_6" name="ljudkalla" value="$8,295" onclick="getChecked()" /> $8,295</td> </tr> <tr class="bg_cell"> <td bgcolor="#b0f6b0"><strong>program 3</strong></td> <td bgcolor="#b0f6b0"><input type="radio" id="radios_7" name="ljudkalla" value="$6,695" onclick="getChecked()" /> $6,695</td> <td bgcolor="#b0f6b0"><input type="radio" id="radios_8" name="ljudkalla" value="$6,995" onclick="getChecked()" /> $6,995</td> <td bgcolor="#b0f6b0"><input type="radio" id="radios_9" name="ljudkalla" value="$7,295" onclick="getChecked()" /> $7,295</td> </tr> </tbody> </table> <p> </p> <p><span class="mainn-txt">Estimated Total = </span> <input name="inputvalue" type="text" id="inputvalue" readonly="readonly" /> + $300 Visa + $150 Qurbani + U.S. domestic round trip flight<br /> <span class="left-text-box">(U.S. domestic round trip flight ranges from $200.00 up to $700.00)</span></p> </body> </html> Quote Link to comment https://forums.phpfreaks.com/topic/285896-how-can-i-send-multi-value-via-form/ Share on other sites More sharing options...
gristoi Posted February 3, 2014 Share Posted February 3, 2014 you need to learn how to use forms in php. mainly with the <form> tag. if you want to sumbit via ajax then you need to look at a jquery solution Quote Link to comment https://forums.phpfreaks.com/topic/285896-how-can-i-send-multi-value-via-form/#findComment-1467548 Share on other sites More sharing options...
Q695 Posted February 10, 2014 Share Posted February 10, 2014 Look up how to do angular JS. Quote Link to comment https://forums.phpfreaks.com/topic/285896-how-can-i-send-multi-value-via-form/#findComment-1468364 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.