brax23 Posted August 11, 2008 Share Posted August 11, 2008 I think this is a pretty basic question and I hope I'm in the right place to ask it. I'm on a form page, when I hit my 'update' button I would like to navigate to another page, run some functions/queries, then navigate back to the previous form page without user input/interaction. I'm trying to use the onload function but I can't seem to get it right. I don't really even know if this is the correct way to automatically navigate. Any help would be appreciated. Link to comment https://forums.phpfreaks.com/topic/119194-onload-help/ Share on other sites More sharing options...
jacksonmj Posted August 11, 2008 Share Posted August 11, 2008 Have you tried: <body onload="history.go(-1)"> Perhaps (on a PHP processing page) header("Location: somepage.html"); ? Or maybe AJAX or a hidden iframe in the original form page? Link to comment https://forums.phpfreaks.com/topic/119194-onload-help/#findComment-613876 Share on other sites More sharing options...
brax23 Posted August 11, 2008 Author Share Posted August 11, 2008 Thanks very much jacksonmj. Works great. Link to comment https://forums.phpfreaks.com/topic/119194-onload-help/#findComment-613886 Share on other sites More sharing options...
brax23 Posted August 11, 2008 Author Share Posted August 11, 2008 Is there any way to use <body onload="history.go(-1)"> and <body onload="history.go(-1)"> without it refreshing the page? Or, is there another method that will navigate automatically to the previous page with it refreshing? Link to comment https://forums.phpfreaks.com/topic/119194-onload-help/#findComment-613927 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.