...

View Full Version : Javascript Submit Form



mitch@vif
05-05-2007, 11:24 PM
I would like to get info from a check box via link or other method. I believe it can be done with javascript with code something like follows?? Sugestions on getting this to work

<form id="form1" name="form1" method="post" action="">
<label>


<p>
<input type="checkbox" name="install" value="checkbox" />
</p>
<SCRIPT language="JavaScript">
function submitform()
{
document.form1.submit();
}
</SCRIPT>

<? $n=$_Get["checkbox"];printf("$n");?>
</form>

Kor
05-06-2007, 10:46 AM
Yes, but you need an event (onclick, onchange,...) applied upon an element, event wich will call the function, following the user's action.

Now, which could be that action? Can't you simply use a submit button?



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum