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. Quote Link to comment 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? Quote Link to comment Share on other sites More sharing options...
brax23 Posted August 11, 2008 Author Share Posted August 11, 2008 Thanks very much jacksonmj. Works great. Quote Link to comment 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? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.