Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Submitting Multiple forms

Status
Not open for further replies.

jsulman

Programmer
Jun 14, 2001
85
0
0
US
I currently have a window that submits three forms: "a", "b", and "c" from one javascript function. I first submit "a" and the "b". When "b" is submitted it calles a servlet which updates some java beans. After form "b" is submitted the I submit form "c". My problem is that it seems that when I submit "c" its not letting the Java code in my servlet for form "b" get finished. When I come back the changes that were supose to be done for "b" are not.

Now if i put an alert box or a very long for loop (1000000+) between the submission of forms "b" and "c" the work in the servlet gets done.

Does anybody know who I can get around this problem, or do I need to submit the to the Java forum? Its happeing in Netscape 4.7x I have not attempted it in any other browsers.

Thanks in advance

Jeff
 
Wouldn't it be a simpler approach to combine all the data into one form and get your servlet to split the data into 'chunks' and process the 'chunks' seperatley?

perhaps your circumstance makes this tricky? Nice one :)
 
Hi,
I think you can do this by putting a test flag there. During the start of the updation in Java Beans set the value as "false" and at the end of it you set the value as "true". Now put the document.form.submit() in if block and check for the flag to be true. If it is true then the form "c" will be submitted.
This way you don't have to worry about the exact execution time for the submission of form "c".
Hope this works....

Regards,
Noorul



 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top