Javascript Errors using Beta 1

Last post 12-12-2006 4:16 AM by rinz. 6 replies.

Sort Posts:

  • Javascript Errors using Beta 1

    10-21-2006, 1:47 AM
    • Loading...
    • kingdamo
    • Joined on 10-21-2006, 5:32 AM
    • Posts 3

    I have attempted to update to Beta 1 and CTP controls, however my update panels will not work.

    I am using Firefox 1.5, I get the same problems in IE also. All I did was change around the references from the old Atlas library to the two new dll's. The Microsoft.Web.Extensions.dll is running in the GAC with full trust. The problem item is in a user control. It all worked fine under the old version. The code from the ascx file:

    <asp:ScriptManager ID="ajaxScripts" runat="server" EnablePartialRendering="true"></asp:ScriptManager>
    <table cellspacing="0" cellpadding="0" border="0">
    <tr>
    <td class="InputLabel" valign="middle">Send To:</td>
    <td valign="middle"><asp:DropDownList ID="cmbGroup" runat="server" CssClass="GenericInput-Medium"></asp:DropDownList></td>
    </tr>
    </table>
    <div style="margin-top: 20px">
    <table cellspacing="0" cellpadding="0" border="0">
    <tr>
    <td><argonyxweb:ImageRollOverButton ID="btnSend" runat="server"></argonyxweb:ImageRollOverButton></td>
    <td><asp:LinkButton ID="linkSend" runat="server">Send ENewsletter</asp:LinkButton></td>
    <td><argonyxweb:ImageRollOverButton ID="btnCancel" runat="server"></argonyxweb:ImageRollOverButton></td>
    <td><asp:LinkButton ID="linkCancel" runat="server">Cancel</asp:LinkButton></td>
    </tr>
    </table>
    </div>
    <asp:UpdatePanel ID="updButtons" runat="server">
    <ContentTemplate></ContentTemplate>
    <Triggers>
    <asp:AsyncPostBackTrigger ControlID="btnSend" EventName="Click" />
    <asp:AsyncPostBackTrigger ControlID="linkSend" EventName="Click" />
    </Triggers>
    </asp:UpdatePanel>
    the argonyxweb:ImageRollOverButton controls are just controls that inherit from ImageButton.

    I get the following three Javascript errors:

     
    Error - Sys.InvalidOperationException: An enumeration definition can only contain integer values.
    Source - WebResource.axd?........... (Source says it's MicrosoftAjax.js)
    Line: 1553

    Error - Sys.Services has no properties
    Source - my file

    Error - Sys.UI.DomEvent has no properties
    Source - WebResource.axd?.......... (Source says it's MicrosoftAjaxWebForms.js)
    Line: 703

    Can someone please help me out here.

     Thanks,

    Kingdamo.
     

  • Re: Javascript Errors using Beta 1

    10-21-2006, 9:52 AM
    • Loading...
    • Luis Abreu
    • Joined on 02-12-2005, 6:22 AM
    • Madeira [Portugal]
    • Posts 5,220
    • TrustedFriends-MVPs
    hello. any chance of producing a complete demo sample that reproduces the problem?
    --
    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: Javascript Errors using Beta 1

    10-21-2006, 1:39 PM
    • Loading...
    • kingdamo
    • Joined on 10-21-2006, 5:32 AM
    • Posts 3

    Thanks for the help.

    I have made a test page, but the ajax works correctly on the test page, even the update progress works too.

    The test page is just a duplicated project of my original, I'll have to apply the Beta 1 again to the main site and see if it works or not.

     

    I'll keep this post open incase anyone else has the problem. I'll update here once I've been able to test the main project again.

     

    Thanks,
    Kingdamo.

  • Re: Javascript Errors using Beta 1

    10-23-2006, 3:01 PM
    • Loading...
    • dsavill
    • Joined on 10-16-2004, 9:25 PM
    • Posts 21

    Any word on this? I'm getting a similar error.

     If I remove the script manager control it goes away...

  • Re: Javascript Errors using Beta 1

    10-24-2006, 10:15 PM
    • Loading...
    • john_2006
    • Joined on 10-25-2006, 1:43 AM
    • Posts 1

    I meet the same problems  for Beta 1 and CTP controls,but the new demo is right,i don't know why,error for :

    Sys.UI.DomEvent and Sys.Services.AuthenticationService  has no properties,cann't reference

    the other error is :

    Sys.InvalidOperationException An enumeration definition can only contain integer values

     thanks

    john

     

  • Re: Javascript Errors using Beta 1

    10-25-2006, 2:19 AM

    I experienced one of the errors that you did Kingdamo.  Sys.InvalidOperationException: An enumeration definition can only contain integer values

    In my case the problem was an incompatibility between MS Ajax B1 and the json.js library written by Douglas Crockford.  I had been using json.js for a while (before JSON support was in Atlas) with no issues.  The json.js library uses a toJSONString prototype and  somewhere in the MS Ajax library a loop iterates through the prototypes on an object and stumbles upon toJSONString.  It seems to expect it to be a number instead of a function and blows up with the 'An enumeration definition can only contain integer values' error message.

     I am now busily working out how to use the MS Ajax JSON serialser instead.

     Your situation may be different, but look out in your js libraries for javascript that introduces prototypes on object classes and you may find the problem.

    Brian.

    brianscott
  • Re: Javascript Errors using Beta 1

    12-12-2006, 4:16 AM
    • Loading...
    • rinz
    • Joined on 12-12-2006, 4:10 AM
    • Posts 1
    You can use:
    Sys.Serialization.JavaScriptSerializer.serialize(obj) instead of toJSONString()
    and
    Sys.Serialization.JavaScriptSerializer.deserialize(obj) instead of parseJSON()
    --
    Best Regards
    Rinat Zemdihanov
    Filed under:
Page 1 of 1 (7 items)
Microsoft Communities
Page view counter