aldrin151 Posted June 26, 2008 Share Posted June 26, 2008 Hello everyone...I'm trying to do a redirect after a certain condition to the previous page...I tried using header("Location: x.php"); , but there are parameters that I need to maintain and I want to avoid alot of coding... Anyway I want to use a javascript:history.go(-1); For example if ($fldtrappid == "1") { javascript:history.go(-1); } I guess this doesn't work since it requires a missing onclick or onblur or something to execute the script. How can I go upon going to the previous page using javascript:history.go(-1); in the code...? Thanks Quote Link to comment Share on other sites More sharing options...
haku Posted June 27, 2008 Share Posted June 27, 2008 How can I go upon going to the previous page using javascript:history.go(-1); in the code...? What? Quote Link to comment Share on other sites More sharing options...
gijew Posted June 27, 2008 Share Posted June 27, 2008 Just an FYI but JS should NEVER be used as a primary source of navigation / redirection. Another FYI: document.location.href='page.html'; GL 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.