[Javascript] two submit buttons in a form ??

Selvaraj, Murugan (Indsys) Murugan.Selvaraj at geind.ge.com
Fri May 17 00:40:51 CDT 2002


Hi trey

Hope you have received me mail.I have given the solutin to use the single
form.
Pls check my suggestion also.

Regards
Murugan

-----Original Message-----
From: Trey H [mailto:tutwabee at hotmail.com]
Sent: Friday, May 17, 2002 3:32 AM
To: javascript at LaTech.edu
Subject: Re: [Javascript] two submit buttons in a form ??


To do this you probably want to make two different forms, one which has 
hidden objects.  When you click one button it will submit the first form.  
When you click the second button, it will take all of the values from the 
first form and move them to the second.  It will then submit the second 
form.  The code is in the attached file.  Here is also a copy of the code:
<form name=frm1>
<textarea name=obj1></textarea>
<br>
Select Box:
<select name=obj2>
<option value=1>Option 1</option>
<option value=2>Option 2</option>
<option value=3>Option 3</option>
<option value=4>Option 4</option>
</select>
<br>
<input type=submit value="Check In">
<input type=button value="Check Out" onClick="checkOut()">
</form>
<form name=frm2>
<input type=hidden name=obj1>
<input type=hidden name=obj2>
</form>
<script>
<!--
function checkOut() {
document.frm2.obj1.value=document.frm1.obj1.value;
document.frm2.obj2.value=document.frm1.obj2.value;
document.frm2.submit();
}
//  -->
</script>

====================================
Trey: tutwabee at hotmail.com
Get free JavaScripts at the Blue Dragon!
Just go to:
http://www.websiter.biz
====================================
Make money by being online:
http://www.degoo.com/index.php?refid=tutwabee
===================================
Earn free traffic for your website easily:
http://tools.addme.com/servlet/popview?id=52260
====================================


>From: "Dijam majiD" <yna54 at hotmail.com>
>Reply-To: javascript at LaTech.edu
>To: javascript at LaTech.edu
>Subject: [Javascript] two submit buttons in a form ??
>Date: Thu, 16 May 2002 18:45:33 +0000
>
>
>Hi,
>
>I have a form in a jsp file that has :
>
>1)Drop down list (for names)
>2)textarea  ( for comment)
>
>
>I want to have two submit buttons (chekin, checkout), who to do it please ?
>thanks
>
>
>
>_________________________________________________________________
>Chat with friends online, try MSN Messenger: http://messenger.msn.com
>
>_______________________________________________
>Javascript mailing list
>Javascript at LaTech.edu
>https://lists.LaTech.edu/mailman/listinfo/javascript






_________________________________________________________________
Join the world's largest e-mail service with MSN Hotmail. 
http://www.hotmail.com


"THIS E-MAIL MESSAGE ALONG WITH ANY ATTACHMENTS IS INTENDED ONLY FOR THE
ADDRESSEE and may contain confidential and privileged information.
If the reader of this message is not the intended recipient,
you are notified that any dissemination, distribution or copy of this 
communication is strictly Prohibited. 
If you have received this message by error, please notify us 
immediately, return the original mail to the sender and delete the 
message from your system."




More information about the Javascript mailing list