Cleint callback javascript error and Postback error ..

Last post 08-28-2007 2:01 PM by vanclei. 6 replies.

Sort Posts:

  • Cleint callback javascript error and Postback error ..

    01-09-2006, 2:19 AM
    • Member
      35 point Member
    • ssanand
    • Member since 01-09-2006, 5:44 AM
    • Posts 9

    Hi,

    i've implemented the client callbacks by using(implementing ) ICallbackEventHandler (ASP.NET 2.0), and it apears that every thing with working fine. I'm able to receive the call back results and also populate the respective controls. However i'm getting an error "__pendingCallbacks[..].async is null or not an object".
    i observed that this error is occuring only if i'm accessing any control on the form from the javascript (i'm doing this to populate a control, i tried with ASP.NET controls, HTML control both giving this error). Is there any work-around for this please? (Note this callback is only one time not a recursive.)

    Thou with the error it is populating the control (i've populated data to a asp:listbox) if i select any item from the list box and do a post back (as other parts have to do post back .. at least to submit the form??) i'm getting "Invalid postback or callback argument."
    (i'm on .NET FRAMEWORK: 2.0.50727)

    Regards
    Anand

  • Re: Cleint callback javascript error and Postback error ..

    01-11-2006, 3:49 PM
    • Contributor
      5,138 point Contributor
    • papabear
    • Member since 08-08-2005, 3:49 PM
    • Posts 851

     

    Incidently, while mine throws errors in IE, mine fails completely to run in Firefox.

    thanks,

    m

    give me suggestions for what to blog... http://www.myfriedmind.com/techblog -> thx

    Mark as "Answered" if this solves that wee old problem...
  • Re: Cleint callback javascript error and Postback error ..

    01-23-2006, 11:54 AM
    • Contributor
      5,138 point Contributor
    • papabear
    • Member since 08-08-2005, 3:49 PM
    • Posts 851

     

    Check out this site for some great workarounds - http://west-wind.com/weblog/posts/2694.aspx

    ;-)

    give me suggestions for what to blog... http://www.myfriedmind.com/techblog -> thx

    Mark as "Answered" if this solves that wee old problem...
  • Re: Cleint callback javascript error and Postback error ..

    01-23-2006, 12:13 PM
    • All-Star
      18,400 point All-Star
    • PeterBrunone
    • Member since 06-19-2002, 9:15 AM
    • I'm standing behind you.
    • Posts 3,683
    • TrustedFriends-MVPs

    Since you mentioned that you're populating a listbox I figured I'd mention ELB.  I don't know if it meets your needs or if it's something you want to consider, but there you go.

     

    Peter Brunone
    MS MVP, ASP.NET
    Founder, EasyListBox.com
    Do the impossible, and go home early.
  • Re: Cleint callback javascript error and Postback error ..

    07-28-2006, 10:46 AM
    • Member
      10 point Member
    • garrettrs
    • Member since 07-27-2006, 9:35 PM
    • Posts 2

    I had the same error when I first started using client callbacks (__pendingCallbacks[..] async is null...).  The solution to my problem was getting rid of all the local variables 'i' in javascript on the client side.  Turns out, that the WebResource.axd file generated by aspnet to handle posting callbacks has a global variable 'i', which is used to iterate through pending callback requests in the WebForm_CallbackComplete method.  If you declare a loop outside the file in your own code like this

    for(i=0;i<x,i++)

    you are unknowingly incrementing the value needed to receive pending callback requests.  I found the easiest to circumvent this problem is to just get rid of my client side 'i' variables.  This problem was insanely annoying before I figured it out.

    Hope this helps.

  • Re: Cleint callback javascript error and Postback error ..

    07-18-2007, 12:05 PM
    • Member
      3 point Member
    • bcarroll
    • Member since 04-13-2007, 4:20 PM
    • Posts 7

    garrettrs, 

    Thank you so much!!!!  This has been driving me nuts all morning.

     -Bryan

    - Bryan -
  • Re: Cleint callback javascript error and Postback error ..

    08-28-2007, 2:01 PM
    • Member
      2 point Member
    • vanclei
    • Member since 08-28-2007, 1:57 PM
    • Posts 1

    Thanks so much for this answer

    I spent a long time trying to figure out why it was happening... but i banned "i" from my js codes and everything is working fine now, thanksBig Smile

Page 1 of 1 (7 items)