Milonic provide full featured pull down web menus for some of the worlds largest companies
click here to see what it can do for you

Download Milonic DHTML Menu
Buy Milonic DHTML Menu

Back To Start Of Archive
Taken From The Forum: Help & Support for DHTML Menu Version 5+
Forum Topic: Click to view post
Last Updated: Saturday July 14 2012 - 06:07:46

Using Milonic and Prototype


Poster: Shap5202
Dated: Friday December 22 2006 - 16:46:56 GMT

I know this has been dealt with in the past on the forum, but nothing really seem to resolve my problem.

I'm using the latest version (5.766) and have tried this on prototype 1.4.0, and whatever their latest dev version is that is available right now.

Unfortunately there is not a public website I can post this on but essentially what I'm trying to do is have some dummy content page, with a div that gets refreshed with content via an Ajax request made through Prototype. There's a parameter you can pass (evalScripts) to the Ajax requset that tells it to evaluate the javascript on the incoming content. This works fine until it tries to deal with Milonic code. I stripped down the incoming HTML to contain nothing but 1 menu with a single item in it and as soon as you call drawMenus() it all goes to heck in a hand-basket.

Firebox reports the error(s) as "$N is not defined" in milonic_src.js. I had thought perhaps it's just a function conflict as was discussed in the past with $F but I can find no reference to $F in any Prototype code. If i take out the drawMenus() call, everything works as I want it to.

I'm running out of things to try here and am now seeing if anyone else has had this problem or similar with a solution. Thanks

follow-up to above.


Poster: Shap5202
Dated: Friday December 22 2006 - 19:32:36 GMT

Ok... I think I figured out what is causing some of the problem, how to solve it is another issue, perhaps if Ruth or anyone else from Milonic is around...

You'll excuse me if this violates the terms of milonic's use, but since the problem was occuring in the drawMenus() method, I went into the source and just separated the lines out so I could use Firebug to debug where it died. The line in question that kills the page is

"_d.write(_mt);" in mmenudom.js I think the problem is because the data being rendered is coming in from the ajax call, and it's trying to do a docment.write() but there's a permissions issue or something since the page had already been written?

Any thoughts there


Poster: Ruth
Dated: Saturday December 23 2006 - 7:15:53 GMT

Hi,

I think this is one issue where you're going to have to contact Milonic directly, if you're a pro license user then you could use the support section. I will post and see if I get a response, but I have no knowledge of the internals of the program. It's just a bunch of symbols and strange word combinations and abbreviations [I know they're js language, but still they look weird] :lol:

I will post to them, but you might try using the support ticket system which is for the professional license holders.

Sorry I can't help on this.

Ruth


Poster: Shap5202
Dated: Sunday December 24 2006 - 17:02:36 GMT

Well... I think the problem is that document.write() cannot be called after the page has finished rendering. So of course when that is done via an AJAX call it's not happy. I was able to get around the problem by overriding the document.write() method after the initial page load. By making it take whatever text was to be written, be put in a span that gets appended to the end of the body.

This works fine for popup menus or submenus, but anything that had position context (inside a td or something) just appears at the bottom of the page. And, it is feasible for use to convert all our menus to a popup menu, and frankly, even if Milonic made some change, the way the Prototype call works, don't see how it would be possible to get the results you would normally achieve. (it strips out all the script tags and executes them in order after the page has been displayed)

Ruth, to your post, we do have a Worldwide license.