ginerjm Posted May 2, 2011 Share Posted May 2, 2011 I want my Cancel button to send me back to whence I came from. I've researched and found tons of postings saying to do history.go(-1), history.go(), window.location.reload('myurl') and other things - all of which didn't do it. Back is good, but even better would be the ability to provide a url to execute. I want to tie this function(?) to the onclick event of my Cancel button. Quote Link to comment https://forums.phpfreaks.com/topic/235324-imitating-the-back-button/ Share on other sites More sharing options...
ginerjm Posted May 2, 2011 Author Share Posted May 2, 2011 ok - found a post that made me notice that the button should be changed from a Submit to a Button type and voila! a js function using location.href = "myurl" works just perfect. Quote Link to comment https://forums.phpfreaks.com/topic/235324-imitating-the-back-button/#findComment-1209299 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.