1

Ok so I have this line of code to try to help my issue but its not doing the trick...

$.when(update_database()).then(window.location.replace ("http://localhost/kumihangul/dashboard.php")); 

The update_database() function makes an ajax call to update an item... when it finished updating the last item I want it to redirect to the dahsboard...

The updating goes well until its the last item, it doesn't finish making the update before the window is reloaded so whatever the last item is doesn't get all the information.

That code is all one line I just split it up to read.

0

1 Answer 1

3
$.when(update_database()).then(updateURL); function updateURL(){ window.location.replace("http://localhost/kumihangul/dashboard.php") } 
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.