I've been struggling with how to change the cursor when AJAX is executing and change back to normal after it's completed. I'm using async:false in jquery. Thnks
I'm not using CSS for this particular page. I turned off async because it produced unpredictable result. There's a sequence of code that sometimes works and sometimes produces error when async is true. Is there no other solution? I must use css? thanks
The reason you're getting unpredictable results is because you're probably not using callbacks properly. Instead of disabling the option, use it correctly.
And why are you not using CSS? It's almost like saying, hey I want to make a web page, but I'm not using HTML.
I have sequential AJAX calls where the each call depends on the previous ones (except for the first call). without asych:false, everything breaks down. I'm thinking about something more like document.body.style.cursor, but it didn't work out. Currenly it's only a page with a background image and a simple button (that invokes series of ajax calls). That's why I don't use css (yet).
Using a synchronous call basically locks up the page and it will not update. So changing the cursor and having the screen update is in a race condition with the Ajax call locking the browser.
synchronous calls are bad and there are always solutions to make the asynchronous, you just have to code them differently.
Even for AJAX that's not sequential, if I set aysnc:true, it won't work. I'm filling two dropdowns. I call ajax to retrieve the datas from server to then be filled into the dropdowns. the ajax for both calls are exactly the same. In this case, the order of both calls doesn;t really matter since they don't need data from each other. So I must set aysync false; I've tried with true, doesn't work. the dropdowns don't get filled. And I've tried the method above, still not working.