By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
431,745 Members | 1,873 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 431,745 IT Pros & Developers. It's quick & easy.

Ajax hanging

P: 30
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

Expand|Select|Wrap|Line Numbers
  1. <script>
  2. $(function(){
  3.  
  4.  
  5.  
  6.     $('#popModal_ex2').click(function(){
  7.         $('#popModal_ex2').popModal({
  8.             html : function(callback) {
  9.             setInterval(function() {
  10.                 $.ajax({url:'notification.php'}).done(function(content){
  11.                     callback(content);
  12.                     }, 4);
  13.                 });
  14.             }
  15.         });
  16.     });
  17.  
  18.  
  19. });
  20. </script>
Jul 5 '14 #1

✓ answered by Dormilich

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

Share this Question
Share on Google+
2 Replies


Dormilich
Expert Mod 5K+
P: 8,639
remove the setInterval() function. it doesnít make sense with a modal window and the repetition time of 4 milliseconds is hilarious.
Jul 5 '14 #2

P: 18
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.
Jul 7 '14 #3

Post your reply

Sign in to post your reply or Sign up for a free account.