1

Sir,I used $.post method for fetch user information and in callback function i get:

<img id=$id src='img/user.jpg' width=60; height=60; /> //from fetch.php

when i put this on jquery html() with 5s Interval :

setInterval(function(){
  $.post('php/fetch.php',
   {usr:1},
     function(info2){
       if(info2!='10' && info2 != ''){ 
         $('#regu').html(info2); }); },5000); 

then in output, i get the user information but with blinking or flushing image after 5sec because of Interval it loads every time,i just want to remove blinking or flushing of image.Please help me to solve this problem.

see problem : see my problem :(

Adi Prasetyo
  • 1,006
  • 1
  • 15
  • 41
UserOnE
  • 29
  • 6
  • I don't really understand your question, can you explain it better? And why do you have a timeout if you want the images to stop blinking? – putvande Jul 30 '13 at 20:54
  • sir i have to fetch user information from database on every 5sec along with image so the image of user is blinking because of timeinterval. see on my website : http://sample.ashishmishra.com/1/ – UserOnE Jul 30 '13 at 21:18
  • use setTimeout in stead of setInterval, so it will only be called once. – Pevara Jul 30 '13 at 21:28
  • i have to call in every 5secs for get updates..for registered users. – UserOnE Jul 30 '13 at 21:36
  • Use : `AJAX` call back [Check its may be works for you..][1] [1]: http://stackoverflow.com/questions/8761713/jquery-ajax-loading-image – ashbuilds Feb 18 '14 at 13:50

0 Answers0