Conflict with ajax library
Conflict with ajax library
We recently started using your menus, version 5.729, and all was going well until I tried to integrate it with the Prototype ajax library http://prototype.conio.net/ and Prototype no longer works because its most basic function is $(). I realized you make heavy use of the dollar sign in your obfuscated code. I tried doing a find/replace in your code to change the dollar signs to something else, but no dice. Is there anything that I can do? I don't want to give either of these components up.
Thanks.
Thanks.
AJAX is getting more pouplar
Hi,
My company also has a corp. license of Milonic. (Thanks to me, of course. ). We are using it and very satisfied with the product and support.
Currently, a huge re-design is going on and we are looking forward to extend the usage of Milonic menu. In addition, I think the AJAX is getting so popular and it will be part of the solutions that we are looking for as well.
I will start testing the AJAX in a couple of weeks. I hope the Milonic and AJAX can co-exist w/o conflicting to each others since both of them are considered as the most sophisticated usage of the Java Scripts.
My company also has a corp. license of Milonic. (Thanks to me, of course. ). We are using it and very satisfied with the product and support.
Currently, a huge re-design is going on and we are looking forward to extend the usage of Milonic menu. In addition, I think the AJAX is getting so popular and it will be part of the solutions that we are looking for as well.
I will start testing the AJAX in a couple of weeks. I hope the Milonic and AJAX can co-exist w/o conflicting to each others since both of them are considered as the most sophisticated usage of the Java Scripts.
The menu should work fine with AJAX but will depend on the implementation.
If there are any problems please let me know and I'll do what I can.
With regard to http://prototype.conio.net/ I'm going to need to see this problem first hand, if you can create a demo using both the menu and the http://prototype.conio.net/ AJAX script, I'll find the conflict and change it.
Hope this helps,
Andy
If there are any problems please let me know and I'll do what I can.
With regard to http://prototype.conio.net/ I'm going to need to see this problem first hand, if you can create a demo using both the menu and the http://prototype.conio.net/ AJAX script, I'll find the conflict and change it.
Hope this helps,
Andy
I can confirm having issues with Milonic menu and prototype as well. The errors were coming from the ${} function. I am going to try and put together a demo that you can trouble-shoot. I would encourge others to do the same.
Prototype is a very powerful scripting library that, along with script.aculo.us, is gaining huge popularity. Making Milonic compatible would give developers a complete arsenal. I plan to use both once an update is implemented.
Prototype is a very powerful scripting library that, along with script.aculo.us, is gaining huge popularity. Making Milonic compatible would give developers a complete arsenal. I plan to use both once an update is implemented.
The prototype library is a very popular standard for implementing ajax which comes from ruby on rails. One of their core overloads for an element accessor is function $(). It would be unreasonable for the prototype makers to change this as it is an external function and used by many sites, whereas the obfuscation of this menu library is purely internal and should not effect any existing implementations.
Personally I evaluated the Milonic menu system for my company recently and noticed its incompatability with prototype; hence I moved on to find another menu system that was compatable. Today by chance I found this forum posting and I am very interested in a speedy resolution to this issue as I would very much like to purchase and implement this menu system with my ajax library.
In terms of recreating the problem, simply add (this is by hand so there may be a typo)
to an existing menu implementation
Personally I evaluated the Milonic menu system for my company recently and noticed its incompatability with prototype; hence I moved on to find another menu system that was compatable. Today by chance I found this forum posting and I am very interested in a speedy resolution to this issue as I would very much like to purchase and implement this menu system with my ajax library.
In terms of recreating the problem, simply add (this is by hand so there may be a typo)
Code: Select all
<script src="http://prototype.conio.net/dist/prototype-1.3.1.js"></script>
Hi All,
The Pre Release version of the menu found at http://milonic.com/menuvinfo.php contains a fix for the rouge variable.
This version will become final release within the next few days.
Please let me know if you find any problems and I'll get right onto it
Hope this helps
Andy
The Pre Release version of the menu found at http://milonic.com/menuvinfo.php contains a fix for the rouge variable.
This version will become final release within the next few days.
Please let me know if you find any problems and I'll get right onto it
Hope this helps
Andy
Same Issue
I am encountering the same issue with prototype.js and the Milonic menu not playing nice together. Are there any plans to fix this? The menu is great, but part of the system that I am building requires AJAX.
Hi All,
I have removed the variable $H from the menu.
I'm not sure how long we can go without the menu and Prototype conflicting again.
I'm also not sure why we should change our variable names too. Can't they meet us half way and change some of their variables? We used $H first so why should we change?
If somebody can contact them and see if we can try and eliminate future conflicts that would be great.
Cheers,
Andy
I have removed the variable $H from the menu.
I'm not sure how long we can go without the menu and Prototype conflicting again.
I'm also not sure why we should change our variable names too. Can't they meet us half way and change some of their variables? We used $H first so why should we change?
If somebody can contact them and see if we can try and eliminate future conflicts that would be great.
Cheers,
Andy
-
- Beginner
- Posts: 1
- Joined: Tue Mar 21, 2006 12:26 am
I think the answer is simple, though not easy: start using namespaces. Both Milonic and Prototype are guilty of modifying the global namespace, of course, but since you don't control the Prototype code, maybe you can do something about it with the Milonic code.I'm not sure how long we can go without the menu and Prototype conflicting again.
This way you'd avoid any conflict with any other Javascript library (or even any existing Javascript code a future customer could have).
Collision w/Prototype 1.5.0-rc0 and Milonic
Using Prototype 1.5.0-rc0 and Milonic Version 5.747, I'm seeing another collision between the two libraries.
Specifically Form.Element.Serializers[method] is not a function at line 1507 in prototype-1.5.0-rc0.js
Subsequent mouse overs on the blank menu give an error of Element has no properties at Line 1506 in prototype-1.5.0-rc0.js
getValue: function(element) {
element = $(element);
var method = element.tagName.toLowerCase(); <-- 1506
var parameter = Form.Element.Serializers[method](element); <-- 1507
if (parameter)
return parameter[1];
}
Specifically Form.Element.Serializers[method] is not a function at line 1507 in prototype-1.5.0-rc0.js
Subsequent mouse overs on the blank menu give an error of Element has no properties at Line 1506 in prototype-1.5.0-rc0.js
getValue: function(element) {
element = $(element);
var method = element.tagName.toLowerCase(); <-- 1506
var parameter = Form.Element.Serializers[method](element); <-- 1507
if (parameter)
return parameter[1];
}
After looking at the code I think it's unlikely to be related to our menu, there is nothing in there that points to anything we have done.
I'm getting the impression that the guys from prototype are doing this on purpose now.
I;m also getting reluctant to change our code every time they release a fix. Milonic was around LONG before AJAX was invented so who really is to blame for all of this? - It's debatable.
Can I ask you to take it up with them, this is not a "Cop Out" just a request to see if they can cut us some slack, if not come back to us and we'll see what we can do.
I'm getting the impression that the guys from prototype are doing this on purpose now.
I;m also getting reluctant to change our code every time they release a fix. Milonic was around LONG before AJAX was invented so who really is to blame for all of this? - It's debatable.
Can I ask you to take it up with them, this is not a "Cop Out" just a request to see if they can cut us some slack, if not come back to us and we'll see what we can do.
Conflict with Prototype & Milonic
The issue seems to be boiling down to "Why should Milonic change and not Ajax/prototype"? I hear you and I give a high amount of credence to this complaint. I'm pretty sure they AREN'T breaking it on purpose but I know it must feel that way.Andy wrote:Can I ask you to take it up with them, this is not a "Cop Out" just a request to see if they can cut us some slack, if not come back to us and we'll see what we can do.
The 3 answer(s) I have developed after researching and pondering the issue is that A) IDEAL: both should change to have non-conflicting namespaces or function names , B) REALISTIC?: that Milonic and Prototype should work to minimize these problems going forward and that C) NECESSARY: Milonic should change in the meantime because it's code is proprietary and commercial giving a higher level of response requirements to customer than an open source project.
It's hard for me to open a ticket with Ruby/Prototype because people can't view/edit milonic's code nor really even easily debug it to pinpoint the problem because it is heavily obfuscated. If you can give me some pointers as to what the bug is, I'll happily open a ticket at http://dev.rubyonrails.org/. Though, Andy, I'd suggest that you might have more weight in posting a ticket. NOTE: I have kids, own a business and work with open source a lot so I understand the difficulty of balancing releasing your work and still paying your bills. This is NOT a proprietary / closed source vs. open source debate.
Anyway, I've put up a set of simple test pages to demonstrate the incompatibility:
The index page http://www.thoughtworthy.com/ajax-milon ... index.html has both Prototype and Milonic enabled.
The second page http://www.thoughtworthy.com/ajax-milon ... lonic.html has the <script> call for prototype changed to <disscript>.
The third page http://www.thoughtworthy.com/ajax-milon ... otype.html has the <script> calls for milonic changed to <disscript>.
Regards,
Kevin A. McGrail