Jump to content


Photo

need to convert form submit buttons to radio buttons


  • Please log in to reply
3 replies to this topic

#1 glennn.php

glennn.php
  • Validating
  • PipPipPip
  • Advanced Member
  • 251 posts
  • LocationAtlanta, GA USA

Posted 22 July 2006 - 03:39 PM

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

	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>


thanks in advance,
g

#2 wildteen88

wildteen88
  • Staff Alumni
  • Advanced Member
  • 10,482 posts
  • LocationUK, Bournemouth

Posted 22 July 2006 - 03:45 PM

change:
<input type="button"
to
<input type="radio"

Also this a HTML issue so I am moving this.

#3 glennn.php

glennn.php
  • Validating
  • PipPipPip
  • Advanced Member
  • 251 posts
  • LocationAtlanta, GA USA

Posted 22 July 2006 - 04:15 PM

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

#4 nogray

nogray
  • Members
  • PipPipPip
  • Advanced Member
  • 930 posts
  • LocationSan Francisco CA

Posted 24 July 2006 - 04:41 PM

as wildteen88 said

change:
<input type="button"
to
<input type="radio"

should do the trick.

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

NoGray.com





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users