01hanstu Posted May 11, 2011 Posted May 11, 2011 Hi, Quick Question (as they always are ;-) ) Looking at updating / modernizing the schools booking system. I am gonna start from the backed, since i'm the only one using it. I like sme of the features of JQuery but some people seem to think the system is broke but realistically its pulling down the timetable, and I would like to have a main page for instance called dashboard and then if you want to view the timetable you select from the list and it will show a loading symbol / images whilst it pulls the page down the page, whilst its on the main a i.e. when they click go it opens it on the div with a progress bar intil its loaded, then hides it. Hope it makes sense, my batteries are dying. Cheers - Stu
webman Posted May 11, 2011 Posted May 11, 2011 These should give you some idea: .ajaxStart() – jQuery API .ajaxComplete() – jQuery API
01hanstu Posted May 13, 2011 Author Posted May 13, 2011 Thanks for the reply webman. I am struggling a bit and wondered if anyone can help. I am just playing around the code on my local machine and this is what I have so far and it still will not work. type=text/javascript> <br /> function loadurl(dest) { try { xmlhttp = window.XMLHttpRequest?new XMLHttpRequest(): new ActiveXObject("Microsoft.XMLHTTP"); } catch (e) { /* do nothing */ } xmlhttp.onreadystatechange = triggered; xmlhttp.open("GET", dest); xmlhttp.send(null); } function triggered() { if (xmlhttp.readyState == 4) { if (xmlhttp.status == 200) { document.getElementById("output").innerHTML =xmlhttp.responseText; } } } <br /> $("#roomselect").click(function(){ <br /> // Put an animated GIF image insight of content <br /> $("#output").empty().html('<img src="ajax-loader.gif" />'); <br /> // Make AJAX call <br /> $("#output").load("http://bookings/"); });<br /> <br /> Thanks - Stuart
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now