This week's book giveaways are in the Jython/Python and Object-Oriented programming forums. We're giving away four copies each of Machine Learning for Business: Using Amazon SageMaker and Jupyter and Object Design Style Guide and have the authors on-line! See this thread and this one for details.
There is no concept of synchronous wait in the browsers. You didn't explain what you are trying to accomplish very clearly. Perhaps a better explanation would help? [ March 31, 2008: Message edited by: Bear Bibeault ]
For example, if a user updates some data in a registration fields, and then clicks a new links with out saving the updated data (saving data happens using AJAX). So user shoud be notified before he is moving into another page.
The alert must custom alert, where a DIV will shown as a layer in the page and user will give his choice what to save the or not.
I believe I explain the scenario, please let me know if you have any comments.
You can try and fire off the Ajax request as a synch call, that might do the trick. There are downsides to synch calls, but this mihgt be your only optoion other than a nice discriptive message on the onbeforeunload explaining them that they need to go back and save.
posted 11 years ago
Wow, I should have used spell check on my last post!
I am not sure what you are talking about.
My only suggestion was to try to set the asynch flag to true so you force the browser to wait until the response comes back before moving on. I am not sure if the browser will actually wait, but it might be a good thing to try out if you want to go that route. It is not hard to build a quick test script and see what happens.
posted 11 years ago
Eric if I was not wrong, Ajax request will help me to wait for some time in my current function, until the server timeout happens. But what if the user is not giving any values for a long time.
Will this technique will help me. Please advice if was wrong �