Thread: Loading Gif
View Single Post
Old 11-22-2012, 04:38 PM   PM User | #5
searls03
New Coder

 
Join Date: Jun 2011
Posts: 27
Thanks: 0
Thanked 0 Times in 0 Posts
searls03 is an unknown quantity at this point
now nothing is happening....no image, no ajax load, no nothing....
Code:
$(document).ready(function() {
   var myImage = new Image();
   myImage.onload = function() {
      // here the image has finished loading
      $.ajaxSetup({
         beforeSend: function() {
            $('#newsContent').append(myImage);
         }
      });

      $.ajax({
type:"POST",
		url:"news_load1.php",
		data:"getNews=true",
		success: function(r) {
            $('#newsContent').html(r);
         },
         ...
      });
   };
   myImage.src = 'pics/loadingAnimation.gif';
});
I also need it in the bo div because that fills the entire page, the newsContent fills only the top half of page.
searls03 is offline   Reply With Quote