ballhogjoni Posted April 4, 2007 Share Posted April 4, 2007 I sthere a way to automatically submit a form? Basically the user will not click the mouse on the submit button, but the user will be taken to the page where the form is supposed to go. Link to comment https://forums.phpfreaks.com/topic/45495-solved-is-there-a-way-to-do-this/ Share on other sites More sharing options...
trq Posted April 4, 2007 Share Posted April 4, 2007 but the user will be taken to the page where the form is supposed to go When? Do you want some sort of event to trigger this off? If so, Javascript is your answer, not PHP. Link to comment https://forums.phpfreaks.com/topic/45495-solved-is-there-a-way-to-do-this/#findComment-220904 Share on other sites More sharing options...
ballhogjoni Posted April 4, 2007 Author Share Posted April 4, 2007 onload I guess. Thanks. what would be the syntax to trigger such an event? Link to comment https://forums.phpfreaks.com/topic/45495-solved-is-there-a-way-to-do-this/#findComment-220911 Share on other sites More sharing options...
emehrkay Posted April 4, 2007 Share Posted April 4, 2007 give your form an id <script type="text/javascript"> onload = function(){ document.getElementById('formID').submit(); } </script> Link to comment https://forums.phpfreaks.com/topic/45495-solved-is-there-a-way-to-do-this/#findComment-220934 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.