Jump to content

How can I send multi value via form?


lost23

Recommended Posts

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>
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.