New CalendarExtender Error in ScriptResource.axd

Last post 09-06-2007 2:45 PM by Quaibaiquer. 25 replies.

Sort Posts:

  • New CalendarExtender Error in ScriptResource.axd

    01-26-2007, 7:49 PM
    • Loading...
    • tennisDave
    • Joined on 01-26-2007, 11:49 PM
    • Posts 3

    I am getting a strange Error with the CalendarExtender, 

    The Error is in the ScriptResource.axd File On Line 1162 the Error with  value = Date.parseLocale(text, this.get_format());

    It occurs in FF and IE , I looked at it in firebug and it the error it shows says Date.parseLocale is not a function.

    The strange thing is that this error shows up on my test server but not on my local system and the CalendarExtender is inside the new tabcontainer which shows the tabs just fine.  

    Any help would be appreciated.

     

    Thanks 


    Filed under: , ,
  • Re: New CalendarExtender Error in ScriptResource.axd

    01-29-2007, 7:41 AM
    • Loading...
    • CaptainGs
    • Joined on 01-29-2007, 12:38 PM
    • Columbia, SC
    • Posts 5

    bump - any updates on this?  I have the exact same problem.  Date.parseLocale is not defined in ScriptResource.axd when I use a CalendarExtender, and it works fine locally.


    As far as I can tell, this doesn't "break" the control -- but the user has look at the error indicator at the bottom of the screen.

    R/ Eric
  • Re: New CalendarExtender Error in ScriptResource.axd

    01-29-2007, 7:59 AM
    • Loading...
    • CaptainGs
    • Joined on 01-29-2007, 12:38 PM
    • Columbia, SC
    • Posts 5

    btw - this appears to only happen if you use server side code to set the control that the CalendarExtender is attached to.

     

    R/ Eric
  • Re: New CalendarExtender Error in ScriptResource.axd

    01-29-2007, 1:32 PM
    • Loading...
    • the_lorax
    • Joined on 01-27-2005, 11:58 AM
    • Beaverton, OR
    • Posts 65

    I too am having this problem but not on 2 different machines. I'm having it between projects on the same machine and have done the following:

    To start off, this project has evolved from Atlas, to AJAX beta through RC1 and RC2 to the full release version. The problem only happens when I click on the text box associated with the calendar and there is already a date in the textbox. When it does this it tries to parse the date but the Date class object in the JS code from the axd file doesn't have a parseLocale method, instead it is named localeParse.

    So far, I have tested the AjaxControlToolkit project which works just fine. I created my own web project and mirrored the references and includes from my broken project even using the current web config from my other project and the test page works just fine in the new project. If I put a breakpoint on the line of code that breaks:

    value = Date.parseLocale(text, this.get_format());

    I can see the Date object is different in the 2 projects. The line of code above is from the _parseTextValue : function(text)  function in the Calendar control axd Script Resource. When I look at the axd include in the script explorer that has the 2 different Date parseLocale/localeParse methods, the files are obviously different. The thing I don't get is where the old version is coming from. I have removed all of the old AJAX/Atlas code from my machine. The only version of the AJAX code in the C:\Windows\assembly folder are the 1.0.61025.0 versions.

     The one difference I had a coworker point out to me was the fact my test project and the AjaxControlToolkit project were both running from the ASP NET Development server. I'm guessing my local IIS instance may be caching the old AJAX code somewhere but that's just a guess.  Any input on this would be greatly appreciated.

    UNLESS someone like you cares a whole awful lot, nothing is going to get better. It's not!
  • Re: New CalendarExtender Error in ScriptResource.axd

    01-29-2007, 3:37 PM
    • Loading...
    • the_lorax
    • Joined on 01-27-2005, 11:58 AM
    • Beaverton, OR
    • Posts 65

    Wow, I can't believe I wasted so much time on such a simple problem...  After installing the new AJAX, I never did an aspnet_regiis -i to reinstall asp.net 2.0 for IIS on my machine. After thinking about how it was only happening with the app I'm running out of my local IIS install, I figured I'd try to re-register in the hopes it would fix the problem and voila!  problem solved. It works like a charm now.

    Just in case someone reads this and is unfamiliar with aspnet_regiis it is the app you use to register the aspnet codebase in IIS. It can be found in your windows folder in the following heirarchy:

    (Windows)\Microsoft.NET\Framework\(version you want to use)\aspnet_regiis.exe

    so for me, it was C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_regiis.exe and you need to run it with the -i flag to reinstall.

    I hope this helps someone :)

    UNLESS someone like you cares a whole awful lot, nothing is going to get better. It's not!
  • Re: New CalendarExtender Error in ScriptResource.axd

    01-29-2007, 4:20 PM
    • Loading...
    • CaptainGs
    • Joined on 01-29-2007, 12:38 PM
    • Columbia, SC
    • Posts 5

    bless you sir -- that was a nice catch Smile

    I didn't even think to do that when I installed the release Ajax -- all I did was flush the IntelliSense cache (another headache from another day). 

    R/ Eric
  • Re: New CalendarExtender Error in ScriptResource.axd

    01-29-2007, 4:52 PM
    • Loading...
    • the_lorax
    • Joined on 01-27-2005, 11:58 AM
    • Beaverton, OR
    • Posts 65

    Thanks! :) Yeah, I didn't expect I would have to reregister in IIS. I figured if that was necessary, the AJAX installer would have done so. (hint hint) Either that or they would have mentioned it somewhere in the release notes. I'm just glad I figured it out before it drove me comletely insane. Being able to help others is an added bonus.

    UNLESS someone like you cares a whole awful lot, nothing is going to get better. It's not!
  • Re: New CalendarExtender Error in ScriptResource.axd

    01-29-2007, 8:15 PM
    Just FYI, IISRESET probably would have done the same with less effort.
    This posting is provided "AS IS" with no warranties, and confers no rights.
  • Re: New CalendarExtender Error in ScriptResource.axd

    02-02-2007, 4:04 PM
    • Loading...
    • indiguy
    • Joined on 02-14-2006, 8:19 PM
    • Plano, TX
    • Posts 45
    The solutions suggested here did not work for me. Please help!!
    Amol Chopra
  • Re: New CalendarExtender Error in ScriptResource.axd

    02-02-2007, 5:07 PM
    • Loading...
    • sburke_msft
    • Joined on 04-04-2006, 7:28 PM
    • Redmond, WA
    • Posts 770
    • AspNetTeam
    The ASP.NET AJAX team is going to make future installs do the IIS Reset automatically. 
    Don't forget, this posting is provided "AS IS" with no warranties, and confers no rights.
  • Re: New CalendarExtender Error in ScriptResource.axd

    02-02-2007, 6:41 PM
    • Loading...
    • the_lorax
    • Joined on 01-27-2005, 11:58 AM
    • Beaverton, OR
    • Posts 65

    Cool! I hope you guys took my tongue in cheek comment lightly. The AJAX release and the controls the team have created are awesome! Thanks for all of the hard work!

    UNLESS someone like you cares a whole awful lot, nothing is going to get better. It's not!
  • Re: New CalendarExtender Error in ScriptResource.axd

    02-05-2007, 5:21 PM

    I am getting this same exact error.  On my local machine, the CalendarExtender is working in all cases.

    When I deploy the same code to a server, I am getting the error. Although, it only occurs when the Text attribute of the Textbox is set in the aspx page.  If it is not set, the CalendarExtender works OK.

    I have tried an iisreset, and I tried reregistering the framework with no luck.  I am encountering the issue on a Windows 2000 server if that makes any difference.  I also have NOT installed any of the AJAX packages on the server.  Is that necessary?

    I have all of the appropiate DLLs in my Bin folder of my web application, and all of the other AJAX extensions and Toolkit controls are working OK.

     

    Here is the code that is producing the error:

     

             <!-- this works without any issues -->
             <asp:TextBox ID="TextBoxTest1" runat="server" Text=""></asp:TextBox>
             <ajaxToolkit:CalendarExtender ID="CalendarExtender1" TargetControlID="TextBoxTest1" runat="server"></ajaxToolkit:CalendarExtender>
             
             
             <!-- this outputs a Javascript error, and the CalendarExtender fails to popup because the Text attribute has a value -->
             <asp:TextBox ID="TextBoxTest2" runat="server" Text="10/4/2007"></asp:TextBox>
             <ajaxToolkit:CalendarExtender ID="CalendarExtender2" TargetControlID="TextBoxTest2" runat="server"></ajaxToolkit:CalendarExtender>
             
                 <!-- Javascript error in Firefox:
                    Error: Date.parseLocale is not a function
                    Line: 1173:
                    
                    _parseTextValue : function(text) {
                        /// <summary>
                        /// Converts a text value from the textbox into a date
                        /// </summary>
                        /// <param name="text" type="String" mayBeNull="true">The text value to parse</param>
                        /// <returns type="Date" />
                        
                        var value = null;
                        if(text) {
     // LINE 1173          value = Date.parseLocale(text, this.get_format());
                        }
                        if(isNaN(value)) {
                            value = null;
                        }
                        return value;
                    },
                    
             -->
     
     

     

     

  • Re: New CalendarExtender Error in ScriptResource.axd

    02-05-2007, 5:44 PM
    • Loading...
    • sburke_msft
    • Joined on 04-04-2006, 7:28 PM
    • Redmond, WA
    • Posts 770
    • AspNetTeam
    Yes you need to install ASP.NET AJAX 1.0 (then don't forget to do an IIS reset...)
    Don't forget, this posting is provided "AS IS" with no warranties, and confers no rights.
  • Re: New CalendarExtender Error in ScriptResource.axd

    02-05-2007, 5:47 PM

    Why does the framework need to be installed if the DLLs are included in the web application?

    I'm a little confused by this because all of the other parts of the AJAX framework that I have been using are working fine on a server that does not have the framework installed.
     

  • Re: New CalendarExtender Error in ScriptResource.axd

    02-15-2007, 10:32 AM
    • Loading...
    • jimmiea
    • Joined on 08-10-2006, 1:28 PM
    • Posts 2

    I'm having the exact same problem.
    I have tried to reset IIS and all that but it doesn't help me.

    This is how my problem appears:

    My calendar works until I do a postback. then it doesn't works any more and I get the following javascript error: Date.parseLocale is not a function

    If I clear the textbox the extender is attached to at the postback
    tbxDate.Text = string.Empty

    then it works! but this isn't how it should work.
     

    someone with any more suggestion? 


     

Page 1 of 2 (26 items) 1 2 Next >