File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSP and the fly likes How to Submit one form from the Other Form Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "How to Submit one form from the Other Form" Watch "How to Submit one form from the Other Form" New topic
Author

How to Submit one form from the Other Form

Amar GURU
Greenhorn

Joined: Apr 02, 2003
Posts: 5
Please help me if anyone knows the Solution for the following.
I've two controls in one form and three controlls in another form. Now I want to submit only form which has 3 controlls. After submitting I want the same page to be displayed and there should not be any changes in the form which has two controlls.
Fisher Daniel
Ranch Hand

Joined: Sep 14, 2001
Posts: 582
Can you explain what you mean with "controls" ?
Are those forms in a jsp page?
daniel
[ April 03, 2003: Message edited by: Fisher Daniel ]
Amar GURU
Greenhorn

Joined: Apr 02, 2003
Posts: 5
Controls could be anything Like TextField or Label...
Ramesh Lakshmanan
Greenhorn

Joined: Oct 14, 2002
Posts: 21
Hi Amar,
Let me know your id so that i can send sample source code , since i am not able to paste the HTML Tages in this forum


SCJP1.2,SCWCD<br />SAP/J2EE Consultant<p><br />"Plan for the Work and Work for the Plan."
Sanjay Deshpande
Ranch Hand

Joined: May 22, 2001
Posts: 111
<Javascript >
function submitMe(submitFlag){
if (submitFlag==1)
{
Document.form1.submit();//put appropriate names /path here
}else{
Document.form2.submit();
}
}
</script>
<form name=form1>
<input type="submit" value="2controlform" onClick>="javascript:submitMe(1);">
</form>
<form name=form2>
<input type="submit" value="2controlform" onClick>="javascript:submitMe(2);">
</form>
Chris Baron
Ranch Hand

Joined: Mar 21, 2003
Posts: 1049
Hi,
if the values in 2-form aren't prefilled and readonly you would have to write all changes with Javascript to hiddenfields in 3-form ...and then, after recalling your page... write them with jsp to 2-form again.
cb
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to Submit one form from the Other Form