Jump to content

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?

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.