Error report: "unknown error" using PopupControlExtender, TextBox & Calendar

Last post 10-16-2006 5:12 PM by DenverJim. 5 replies.

Sort Posts:

  • Error report: "unknown error" using PopupControlExtender, TextBox & Calendar

    09-28-2006, 6:43 PM
    • Loading...
    • mrhoglund
    • Joined on 09-28-2006, 10:19 PM
    • Posts 2

    Hey guys,

    I had an error when using a PopupControlExtender with a Calendar to populate the date in a textbox. The error I got when clicking the date in the calendar was a JavaScript alert saying "unknown error".

    After debugging the code for while i found what caused the error; I used the && operator in an if statement in one of my own JavaScript functions. The function with the if statement was never called by the calendar but still generated the error. Even creating a function that was never called by anything that included the && operator seems to generate the error. As soon as all the && were removed from my code the page and calendar selection worked fine.

    Don't know if it was something in my code that generated this particular error or if this is a possible bug in asp.net ajax, I though I should report it anyhow...

    Cheers, /Johan
     

  • Re: Error report: "unknown error" using PopupControlExtender, TextBox & Calendar

    09-29-2006, 3:59 AM
    • Loading...
    • Luis Abreu
    • Joined on 02-12-2005, 1:22 AM
    • Madeira [Portugal]
    • Posts 5,218

    hello.

    well, if you're putting the functions in the head section of the document, then that's a known problem with the current version of atlas. the head section is packaged on the xml msg that is sent from the server in response to a partial postback and its contents aren't placed inside a cdata section (this only happens when the head has the runat="server"). so, you can't have "forbidden" chars on that area without escaping them.

    --
    Regards,
    Luis Abreu
    email: labreu_at_gmail.com
    PT blog: http://weblogs.pontonetpt.com/luisabreu
    EN blog:http://msmvps.com/blogs/luisabreu
    http://www.pontonetpt.com
    http://weblogs.pontonetpt.com/
  • Re: Error report: "unknown error" using PopupControlExtender, TextBox & Calendar

    09-29-2006, 1:49 PM
    • Loading...
    • mrhoglund
    • Joined on 09-28-2006, 10:19 PM
    • Posts 2

    Ok that makes sence, thanks for the reply! 

    /Johan 

  • Re: Error report: "unknown error" using PopupControlExtender, TextBox & Calendar

    10-14-2006, 7:38 PM
    • Loading...
    • DenverJim
    • Joined on 09-27-2006, 3:40 PM
    • Posts 8

    While I just wasted an afternoon debugging a quasi-similar problem. I've got a bunch of js functions in a head section but I do NOT have runat=server. I found a decrementing for loop (  for (int i=10;i>0;i--), also caused unknown error issue. After messing around I find it is the decrment operator (--). I even tried doing this: alert("hi -- there") and got same issue. Seems the parsing is finding the -- and assuming it's found the end of comments or something like that.

     I notice other characters causing issues if all script was not surrounded by HTML/XML comments <!--   --> but having the comments around other scripts seems to prevent errors for most special characters except decrement. So my for loop now says i=1-1 for the decrement.

     Does anyone know if Microsoft confirms this to be a bug and if so whether it's fixed in ver 1.0?

     

     

  • Re: Error report: "unknown error" using PopupControlExtender, TextBox & Calendar

    10-15-2006, 3:27 AM
    • Loading...
    • Steve Marx
    • Joined on 05-26-2006, 8:35 PM
    • Microsoft
    • Posts 643
    I can confirm both.  It's a known issue (basically, the entire <head> must be valid XML), and yes, in the next public release, this will no longer be an issue.
    Steve Marx | ASP.NET AJAX Evangelist | Microsoft Corporation
  • Re: Error report: "unknown error" using PopupControlExtender, TextBox & Calendar

    10-16-2006, 5:12 PM
    • Loading...
    • DenverJim
    • Joined on 09-27-2006, 3:40 PM
    • Posts 8

    great, thanks and I'll be looking forward to it! (mostly for a different fix having to do with setting field focus after partial postback)

     

     

Page 1 of 1 (6 items)
Microsoft Communities
Page view counter