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 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...
Guest 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"); 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 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...
Guest Posted December 2, 2011 Share Posted December 2, 2011 Jquery is the example I used. 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. 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
Archived
This topic is now archived and is closed to further replies.