Conflict event noAvailable

54 views
Skip to first unread message

David

unread,
Feb 24, 2009, 6:58:39 AM2/24/09
to Prototype & script.aculo.us
I just want report you an error i have found and solve (perhabs not
with the best way).

I'm using the version 1.6.0.3 of prototype.js library.

I have to add the jquery datepicker library. There have a confict with
the jquery event fired.

I just add a try ... Catch block in the prototype.js library to sove
the probleme.

My new "fire: function(element, eventName, memo)" look like this at
line 4053 of prototype.js library:

fire: function(element, eventName, memo) {
element = $(element);
if (element == document && document.createEvent && !
element.dispatchEvent)
element = document.documentElement;

var event;
if (document.createEvent) {
event = document.createEvent("HTMLEvents");
event.initEvent("dataavailable", true, true);
} else {
event = document.createEventObject();
event.eventType = "ondataavailable";
}

event.eventName = eventName;
event.memo = memo || { };

if (document.createEvent) {
element.dispatchEvent(event);
} else {
// Add Try...Catch block to solve jquery-1.3.1.js conflict
try {
element.fireEvent(event.eventType, event);
catch(Exception ex) {}
}

return Event.extend(event);
}


Best regards

David

David

unread,
Feb 24, 2009, 8:01:22 AM2/24/09
to Prototype & script.aculo.us
Finally i have commented all this function.

Best regards

David

Alex Mcauley

unread,
Feb 24, 2009, 8:09:31 AM2/24/09
to prototype-s...@googlegroups.com
use jQuery.noConflict(); and it wont conflict

HTH

Alex
Reply all
Reply to author
Forward
0 new messages