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

call a .js file in 'ShowMenu' function.


Poster: reg
Dated: Sunday December 24 2006 - 4:56:36 GMT

Hello.

How do I call a javascript file (not function) into the 'showmenu' attribute?

For example, to begin with the parent link: aI("showmenu=menuname;text=. . . .

In the submenu, called by 'showmenu', the .js file does not display--even if I use the 'type=html'.

Your help is appreciated.

Thank you.


Poster: Ruth
Dated: Sunday December 24 2006 - 11:35:20 GMT

Hi,

What exactly are you trying to do with that js file? I mean do you want it to show in the submenu as a link that can be clicked?

Ruth


Poster: reg
Dated: Sunday December 24 2006 - 18:23:29 GMT

Thank you for the reply.

Not necessarily as a link, although I could make the display area linkable if I wish with javascript and css, so I do not need the 'url' attribute in the submenu.

I got the .js file to display by using 'type=html' and calling it an iframe, but I do not want to use an iframe.


Poster: Ruth
Dated: Sunday December 24 2006 - 21:25:20 GMT

Hi,

Well, I still don't know how to help since I don't really know what it is you are trying to do. Do you want the js to run. That's why I asked about the link. If you're trying to run some kind of function when the submenu opens there are ways to run a function but I don't know what it is you want to do. I mean, there are properties like clickfunction, offfunction, onfunction, itemOn, itemOff ... These run a function that is called when you mouseover an item, or click it if that's how you have it set up.

I just have to understand what it is you are trying to do. The iframe was what I was going to suggest, but since you don't want that, I can point to the other, but not knowing what it is you are trying to do, i.e. have some function do something to an item, or to some page, or maybe some kind fo form.

Try the demos page and that will give you an idea of functions written to help people do x, y, or z in the menu, but again I don't know if that will help.

http://support.milonic.com/demos/

The ones at the top are what I mean, exluding the IE Filters which is part of the menu. The bottom ones are bolt-on done by Milonic so again part of the menu.

Ruth


Poster: reg
Dated: Monday December 25 2006 - 3:21:10 GMT

Thank you, Ruth, for your very detailed reply.

The script is a dhtml animation. The file executes when called (not a js function call) and floats down from the top of your browser window. Or, in this situation, from the submenu (called by the 'showmenu' function), which it did when I called it within an iframe.

The content (html) is already written in the .js file.

If I want, though not necessarily need, external links within the content of the .js file, I can't break out of the iframe -- even with the target=_top or parent, which is inherently due to the way the script is written. That's why I want it to run it from the submenu, but do not know the syntax to use.

Thank you for your reference. Searching faqs and tech documents as well did give the syntax to call a js function in this case but not a file.

Kind regards