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:32

Compression error

Poster: sa}{en
Dated: Sunday September 18 2005 - 18:25:51 BST

I've tried to compress my menu_data.js with your online compressor.

When trying the compressed version the menu will not work. is this a common error? My file is quite big, so it would be nice with a little compression.

Poster: Ruth
Dated: Sunday September 18 2005 - 19:09:49 BST


I just tried using the compressor and found that when I just copied and pasted the output to a file and saved it, the menu using that file works fine, but when I clicked the link to download the .js file and used that file, I got errors and the menu wouldn't show.


Still have trouble

Poster: sa}{en
Dated: Monday September 19 2005 - 8:25:28 BST

The file will still not work. Would I need some special editor when pasteing? I just use notepad, and thought it would work fine.

The file i try to compress is:

You see the menu at

By the way. Is there other ways to make it faster or smaller to load. It's quite big right now.

Poster: Ruth
Dated: Monday September 19 2005 - 16:13:34 BST

Try removing all the top stuff that isn't usually in the menu_data.js file. Begin the file with _menuCloseDelay=500; Then after it's compressed, paste the other stuff back into it. I just tested your page and that seemed to work.


Thank you

Poster: sa}{en
Dated: Monday September 19 2005 - 18:36:23 BST

Thank you. It worked fine now. But it didn't help much. Is there another way to compress more or to make the file smaler? Would it help haveing the menu_data in more files or something like that?

Poster: Ruth
Dated: Tuesday September 20 2005 - 0:58:48 BST

There's not much you can do since it contains so much. Even if you split it, you still have the same amount, just in different files. One thing you can do is make sure you eliminate all the lines you have slashed out. The ones with // in front of them. You can remove the copyright since that is in the program files. And, you can use the copyOf method for your styles.

In place of the visstistyle put this
visstistyle=new copyOf(mainstyletopp);
since, both that style and the mainstyletopp only have two items different.

In place of the menuStyle2 and menuStyletopp you can put these
menuStyle2=new copyOf(menuStyle);

menuStyleTopp=new copyOf(menuStyle);
menuStyleTopp.onborder="2px solid #e7f6fd";
menuStyleTopp.overfilter="Fade(duration=0.2);Alpha(opacity=90);Shadow(color=#999999, Direction=135, Strength=5)";       
I'm pretty sure they are correct, but you need to check the menuStyle from which they take their copyOf since you have two pagebgcolors listed in it. That cut another 1kb off the regular file size, before compression so it was 39kb, don't know what it would be after compression. Every kb helps.

Hope that helps.