Go Back   CodingForums.com > :: Client side development > JavaScript programming

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 05-05-2007, 10:24 PM   PM User | #1
mitch@vif
New Coder

 
Join Date: May 2007
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
mitch@vif is an unknown quantity at this point
Javascript Submit Form

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>
mitch@vif is offline   Reply With Quote
Old 05-06-2007, 09:46 AM   PM User | #2
Kor
Red Devil Mod


 
Kor's Avatar
 
Join Date: Apr 2003
Location: Bucharest, ROMANIA
Posts: 8,478
Thanks: 58
Thanked 379 Times in 375 Posts
Kor has a spectacular aura aboutKor has a spectacular aura about
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?
__________________
KOR
Offshore programming
-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
Kor is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 04:24 AM.


Advertisement
Log in to turn off these ads.