window.location.replace() not working to redirect browser
Don’t use .replace() for this, just assign the value directly. Example
Don’t use .replace() for this, just assign the value directly. Example
I’m currently working on a mobile site with authentication using PHP sessions with a database. I have a login page with a form that goes to server_login.php on submit. The php file then creates some session data (store in $_SESSION), and redirects the user back to the index page: The new web page (index.php) loads correctly; however, … Read more
window.location.href is not a method, it’s a property that will tell you the current URL location of the browser. Changing the value of the property will redirect the page. window.open() is a method that you can pass a URL to that you want to open in a new window. For example: window.location.href example: window.open() example: … Read more