Syntax for clickfunction

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
musicnorth
Beginner
Beginner
Posts: 2
Joined: Mon Jul 23, 2007 11:46 pm

Syntax for clickfunction

Post by musicnorth »

Hi,

Search the site as I might, I can't find a detailed description of how to reference an external js file using clickfunction.

Could someone please give me the step by step details?

Also, can I reference a file from my site (using full address / partial address), or do I have to run the script at the beginning of the menu_data file?

With best wishes,

Alyssa.
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

Hi,

Well, I'm not a js person, but if you're asking about triggering a function from a click of a menu item you would do it using clickfunction= in the aI string, rather than onfunction= which would be to activate it on mouseover. You can take a look at the following sample, which talks about onfunction, offfunction and even using url=javascript: whateverFunction. As far as I know you could just substitute clickfunction for onfucntion, and of course with the one that uses url=javascript: that wouldn't activate until you clicked for the url.

http://milonic.com/menusample15.php

There are also some created demos which use clicks of an item to activate a function. The demos at the top are the ones created to help in response to questions in the forum. Most were created by Kevin and there is no support for them at Milonic since they were not created by Milonic and Kevin no longer has time to help at the forum. I think they are pretty in depth as to explanations. Maybe they will help you to figure out how to do what you want. Most, of the top one, though not all are activated by clickfunction.

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

Hope this helps. If not, if you could explain more in depth what you are trying to do, maybe I could figure out how to do it.

Ruth
musicnorth
Beginner
Beginner
Posts: 2
Joined: Mon Jul 23, 2007 11:46 pm

Post by musicnorth »

Thanks, Ruth!

I ended up going _around_ the problem for the moment, but now I know where to look if I decide to launch the function directly.

With best wishes,

Alyssa.
Post Reply