Ajax hanging

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Bala Kumaran
    New Member
    • Jan 2013
    • 30

    Ajax hanging

    Hello friends,
    I am developing my website with ajax and php scripts. My web page is hanging by the following ajax script. How should I want modify the script to avoid hanging

    The script is

    Code:
    <script>
    $(function(){
    
    	
    	
    	$('#popModal_ex2').click(function(){
    		$('#popModal_ex2').popModal({
    			html : function(callback) {
    			setInterval(function() {
    				$.ajax({url:'notification.php'}).done(function(content){
    					callback(content);
    					}, 4);
    				});
    			}
    		});
    	});
    	
    	
    });
    </script>
  • Dormilich
    Recognized Expert Expert
    • Aug 2008
    • 8694

    #2
    remove the setInterval() function. it doesn’t make sense with a modal window and the repetition time of 4 milliseconds is hilarious.

    Comment

    • aleciagibbons14
      New Member
      • Jun 2014
      • 18

      #3
      i am not good in coding but i want also to learn about that, can you try that suggestion shared above if its works but maybe its works that expert shared ideas. hope you can share here the result.

      Comment

      Working...