Jump to content

need to convert form submit buttons to radio buttons


glennn.php

Recommended Posts

i would like to convert these two submit buttons to a radio button choice - is there anyone that can help?

[code]
function send_data( selection )
{
if (chkform())
{

  document.jnl2_sign_form.method = "post";

  if ( selection == "sign_in" ) 
  {
//** changed $sign_in_page to maillist.php **/
  document.jnl2_sign_form.action = "../new1/maillist.php?do=sign_in&language=$language&ml_id=$ml_id";
  }

if ( selection == "sign_out" )
{
document.jnl2_sign_form.action = "../new1/maillist.php?do=sign_out&language=$language&ml_id=$ml_id";
}

document.jnl2_sign_form.submit();
}
}
</script>
<div class="jnl2">
<div class="mini_sign_form">

<form name="jnl2_sign_form">
  <nobr><b>{$loc_lang["email_address"]}</b></nobr><br>
  <input type="text" name="email" style="width: 70%" maxlength="45"><br>
  <p align="center">
  <nobr>
        <input type="button" value="{$loc_lang["sign_in_newsletter"]}" name="sign_in" onclick="send_data(this.name)" class="buttons"><br />
        <input type="button" value="{$loc_lang["sign_out_newsletter"]}" name="sign_out" onclick="send_data(this.name)" class="buttons">
  </nobr>
  </p>
  </form>

[/code]

thanks in advance,
g
ok, let me rephrase the polite and respectful request:

i would like to change those two submit buttons to radio buttons in such a way as to have the necessary data properly submitted.

is there anyone that wouldn't mind going to the trouble of showing me how it would be done? i hate to be a bother...

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.