elabuwa Posted December 2, 2011 Share Posted December 2, 2011 Hello guys, I am running in to some issues where users trigger another even before an ajax procedure is completed. Eg after a button click (where ajax is doing some magic), the user clicks on another button (which will do some more magic) before the first buttons process is completed. I have seen some sites doing some sort of of lightbox technique which in this case shows a the moving bar or the rotating circle thingi. Are they using the lightbox method or is there any other easy way? Cheers Elabuwa Quote Link to comment https://forums.phpfreaks.com/topic/252311-ajax-method-to-show-that-the-script-is-processing/ Share on other sites More sharing options...
Spring Posted December 2, 2011 Share Posted December 2, 2011 // Put an animated GIF image insight of content $("#content").empty().html('<img src="loading.gif" />'); // Make AJAX call $("#content").load("http://example.com"); Quote Link to comment https://forums.phpfreaks.com/topic/252311-ajax-method-to-show-that-the-script-is-processing/#findComment-1293468 Share on other sites More sharing options...
elabuwa Posted December 2, 2011 Author Share Posted December 2, 2011 Hi Spring, thank you for your reply. What framework should I be using to get this up an running? jquery, json etc? I'm a noob when it comes to ajax Quote Link to comment https://forums.phpfreaks.com/topic/252311-ajax-method-to-show-that-the-script-is-processing/#findComment-1293487 Share on other sites More sharing options...
Spring Posted December 2, 2011 Share Posted December 2, 2011 Jquery is the example I used. Quote Link to comment https://forums.phpfreaks.com/topic/252311-ajax-method-to-show-that-the-script-is-processing/#findComment-1293555 Share on other sites More sharing options...
imperium2335 Posted December 7, 2011 Share Posted December 7, 2011 Those aren't frameworks. You don't always have to use a framework, you can use your own, its just a way of doing something. To show something loading, you can just put a GIF in a tag, and then when a certain function completes, like $.post etc, have the html of that tag replaced with 'loaded' etc. Quote Link to comment https://forums.phpfreaks.com/topic/252311-ajax-method-to-show-that-the-script-is-processing/#findComment-1295197 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.