Jump to content

Archived

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

glennn.php

need to convert form submit buttons to radio buttons

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

Share this post


Link to post
Share on other sites
change:
<input type="button"
to
<input type="radio"

Also this a HTML issue so I am moving this.

Share this post


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

Share this post


Link to post
Share on other sites
as wildteen88 said
[quote]
change:
<input type="button"
to
<input type="radio"
[/quote]
should do the trick.

You may need to add some text next to the radio button.

Share this post


Link to post
Share on other sites

×

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.