Skip to content Skip to sidebar Skip to footer

Window.location.href On Ajax Success Not Working

I've been trying to solve this for a while now, but I can't get itworking. When a user clicks a link he's asked to confirm that he wants to take this action. Then a ajax call is ma

Solution 1:

Try using assign() instead:

window.location.assign(data);

window.location.href is a property, not a method.

Solution 2:

Location assign() Method

The assign() method is supported in all major browsers.

Solution 3:

You can use this

<form action="submit.php" onsubmit="return false;" method="post">

and your same script will be work.

Solution 4:

You can also use window.location = "someurl";

Post a Comment for "Window.location.href On Ajax Success Not Working"