469,307 Members | 1,755 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,307 developers. It's quick & easy.

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

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.

2 1111
Dormilich
8,651 Expert Mod 8TB
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
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.

Similar topics

6 posts views Thread by Harlan Messinger | last post: by
25 posts views Thread by Shannon Jacobs | last post: by
10 posts views Thread by G Matthew J | last post: by
1 post views Thread by dan.goyette | last post: by
1 post views Thread by =?iso-8859-1?q?Jean-Fran=E7ois_Michaud?= | last post: by
5 posts views Thread by Stanimir Stamenkov | last post: by
3 posts views Thread by Microsoft | last post: by
2 posts views Thread by kj | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by harlem98 | last post: by
1 post views Thread by Geralt96 | last post: by
reply views Thread by harlem98 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.