Jump to content

[SOLVED] Submit dang you, SUBMIT!!


MichaelMackey

Recommended Posts

So one of the pages I've been editing recently can get really screwy.  It has a lot of repeat forms with the same name on a single page.  Anyway I'm not sure what final effect that can have but I felt it was important to point out for this question (note that because I am editing a page getting rid of those multiple same name forms can have serious side affects).

 

Anyway, all I want to do is submit the document but I can't seem to find something that works.  This is the button I have near the top of the page.

 

echo '<input type="button" onclick=" document.submitresults.submit();" value=" Send Email ">';

 

Now I've tried a fair amount of combinations here and nothing I try seems to have a submit result of the page.  Why is the page not submitting for me?  I'm still learning this stuff so I can't help but think I just missed something obvious.

 

Thanks.

Link to comment
https://forums.phpfreaks.com/topic/109003-solved-submit-dang-you-submit/
Share on other sites

Yes that works when I put it within the form tags now that I try that, I was under the impression submit simply submitted the whole page and it didn't matter what form it was in, thanks.

 

But why will the button with the javascript not submit the form?  Is it because the forms have duplicate names?

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.