I added a detailed explanation of the original problem along with the
original source code here:
http://gist.github.com/269990#file_microsoft_ajax_web_forms.debug.js

There are essentially two issues.

1) Microsoft's client-side code is not written to be very defensive.
They use essentially `if (elementOrDocument.id)
elementOrDocument.id.stringMethod();` instead of `if (typeof
elementOrDocument.id == "string")
elementOrDocument.id.stringMethod();` or something like that.

2) MooTools creates an `id` method on the global document object
instead of on a unique namespace.

— Thomas Aylott
    SubtleGradient
    MooTools



On Tue, Jan 5, 2010 at 10:44 PM, Thomas Aylott
<oblivi...@subtlegradient.com> wrote:
> Try this as a quick fix/workaround:
> http://gist.github.com/269990
>
> Basically it appears as if `clientID` is a function and not a string.
> So it doesn't have the `startsWith` method and therefore breaks.
> This workaround simple adds the method they expect to find.
> This workaround shouldn't effect anything else. This function sitting
> there is perfectly harmless.
>
> Let me know if this does or doesn't solve your issue.
>
> Thanks.
>
> — Thomas Aylott
>    SubtleGradient
>    MooTools
>
>
>
> On Mon, Aug 3, 2009 at 12:45 PM, codeBender <andrew.gree...@gmail.com> wrote:
>>
>> First, let me say thanks to everyone who works on this awesome
>> library. It's very handy indeed and I certainly appreciate the hard
>> work that has gone into it.
>>
>> I have a few questions/issues:
>>
>> 1. MooTools is causing a runtime exception in the MS Ajax script
>> library.
>>
>> This JS runtime exception occurs anytime I click anywhere on the page.
>> I have been debugging this thing all morning and haven't made much
>> progress.
>>
>> // Name:        MicrosoftAjaxWebForms.debug.js
>> // Assembly:    System.Web.Extensions
>>
>> Line: 722
>> Error: Object doesn't support this property or method
>>
>> Here's the JS code from that section:
>>
>> function Sys$WebForms$PageRequestManager$_matchesParentIDInList
>> (clientID, parentIDList) {
>>    for (var i = 0, l = parentIDList.length; i < l; i++) {
>>        if (clientID.startsWith(parentIDList[i] + "_")) {
>>            return true;
>>        }
>>    }
>>    return false;
>> }
>>
>> If I remove the MooTools script reference from my page, the error
>> stops occurring.
>>
>>
>> 2. Is there a way to set a background image using the Fx.start method?
>> So I'd like to do something like this: myFx.start('background-image',
>> '<insert path to image>');
>>
>>
>> 3. Is there a scaled down version of MooTools broken up into
>> subscripts? I'd like to only import the classes and methods required
>> to use the tween methods instead of the entire library.
>>
>> Thanks...
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>

Reply via email to