MichaelMackey Posted June 6, 2008 Share Posted June 6, 2008 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 More sharing options...
jonsjava Posted June 6, 2008 Share Posted June 6, 2008 if you don't need to use javascript, you could change it to <input type="submit" value="Send Email"> Link to comment https://forums.phpfreaks.com/topic/109003-solved-submit-dang-you-submit/#findComment-559182 Share on other sites More sharing options...
MichaelMackey Posted June 6, 2008 Author Share Posted June 6, 2008 Yes, that's what I tried initially, yet it has the same effect. The same effect being nothing:( How does location affect submit buttons? Is it possible I have mine somewhere where the submit does not have enough information to act? Link to comment https://forums.phpfreaks.com/topic/109003-solved-submit-dang-you-submit/#findComment-559186 Share on other sites More sharing options...
.josh Posted June 6, 2008 Share Posted June 6, 2008 is it inside your form tags? Link to comment https://forums.phpfreaks.com/topic/109003-solved-submit-dang-you-submit/#findComment-559189 Share on other sites More sharing options...
jonsjava Posted June 6, 2008 Share Posted June 6, 2008 lol. too obvious. I didn't think to ask him that. Link to comment https://forums.phpfreaks.com/topic/109003-solved-submit-dang-you-submit/#findComment-559191 Share on other sites More sharing options...
MichaelMackey Posted June 6, 2008 Author Share Posted June 6, 2008 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? Link to comment https://forums.phpfreaks.com/topic/109003-solved-submit-dang-you-submit/#findComment-559193 Share on other sites More sharing options...
.josh Posted June 6, 2008 Share Posted June 6, 2008 if i understand my javascript correctly, if you do not specify a form name/id it will default to the one whose tags it resides in (which it wasn't in any). But I'm not a javascript expert; might wanna ask over in that forum. Link to comment https://forums.phpfreaks.com/topic/109003-solved-submit-dang-you-submit/#findComment-559195 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.