PDA

View Full Version : two forms, 1 page



SmoothDime
April 23rd, 2005, 11:35 PM
hi,

i have two forms on a single page.

when i click the submit button for the first form it submits the first form.

when i click the submit button for the second for it still submits the first form.

before i post all my html, can someone tell me if there is something obvious that i am doing wrong?

if i comment out the first form so there's only the second, then the second one is submitted correctly.

i'm going to try a javascript fix, but if anyone knows about this please let me know...

thanks
peace

SD

SmoothDime
April 24th, 2005, 12:06 AM
hi,

i tried it using javascript and got pretty much the same thing.

in the second form i have a button that calls a javascript function that executes a line of code like this:

document.secondForm.submit();

if i have the first form and the second form both on the page, a call to this code produces an error and nothing is submitted. if i comment out the first form so only the second is there, a call to this javascript works fine.

so the first form is in some way interfering with the second.

anyone know what the deal is here?

thanks

SD

*edit*

thought i might add that the second form is an miage upload form so it has a file input and the enctype is "multipart/form-data". this might be where the prob is.

amitgeorge
April 24th, 2005, 09:25 AM
post a link so we can see the source code