Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New Coder
    Join Date
    Jan 2007
    Location
    Chennai, Tamil Nadu, India
    Posts
    71
    Thanks
    5
    Thanked 0 Times in 0 Posts

    jquery callback infinite call

    Hi,

    here is one peculiar behavior of jquery callback

    Code:
    $('#mooka').fadeOut(100, function() { sendMail();  } );
    and in the head section i have included error handler to display any error if any.

    Code:
    <script>onerror = function(a,b,c) { alert(a+b+c); }</script>
    This will alert any dom error with error message, filename and line number.

    now i do a fadeout using jquery and i have provided al call back function code.

    if there is an error in the sendmail function the error handler function will alert the error.

    in this case i made a spelling mistake and the error handler alerted the error when sendmail is called. the error is in sendmail function.

    the error alert is coming infinitely. i keep clicking ok but still it appears. then i used taskmanager to close firefox. (another way round is to keep pressing escape and press F5 at one point the page refreshes). This is the case only if the error occured in the callback function of any fadeout.

    hope it is clear of what i am explaining.

    the fadeout has a callback function which will called after the fadeout is complete. if there is any js dom erros in the callback function my error handler alerts. but it is doing that infinitely.

    one way is to disable the error handler. the reason for using that is to debug js errors for all browsers regardless the firebug of firefox and developer tools of IE8.
    http://vikku.info/
    - யானைக்கும் அடிசறுக்கும்

  • #2
    Senior Coder Spudhead's Avatar
    Join Date
    Jun 2002
    Location
    London, UK
    Posts
    1,856
    Thanks
    8
    Thanked 110 Times in 109 Posts
    Well, I guess the obvious question is: what does your error alert say?

  • #3
    New Coder
    Join Date
    Jan 2007
    Location
    Chennai, Tamil Nadu, India
    Posts
    71
    Thanks
    5
    Thanked 0 Times in 0 Posts

    look at my post

    As i had already mentioned... i am using an error handler...
    where ever an error occurs i get an alert.

    i am calling a function like after an animation has completed...
    in that function there is a syntax error or any other dom error for which i get an alert because of onerror handler... but there is supposed to be only one alert and that is working well for the past 5 YEARS. in the case of jquery that alert is repeated infinitely.
    http://vikku.info/
    - யானைக்கும் அடிசறுக்கும்


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •