Activating Functions on Mouseover

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
tommyw
Beginner
Beginner
Posts: 1
Joined: Tue Mar 14, 2006 1:09 pm

Activating Functions on Mouseover

Post by tommyw »

Hi,

I am trying to use the onfunction and offfunction properties of a menu item, but the arguments that are passed in my js funcitons should relate to the menu item (whether by name, or something else). I can see from the sample Activating Functions on Mouseover that this is possible, however, the sample uses two functions, item_on() and item_off(). The smaple download, however, does not contain these functions anywhere.

Please could you either show me what is contained in these functions, else let me know how I can access the various properties on the menuitem object.

Thanks in advance,

Tom.
Migru
Milonic Guru
Milonic Guru
Posts: 669
Joined: Tue Nov 01, 2005 8:22 pm
Location: Hamburg - Germany
Contact:

Post by Migru »

Hi

the functions item_off() and item_on() as far as I see just demonstrate how the onfunction=item_on() and the offfunction=item_off() work.
This means, if you have yourfunction() or you have any function available at this instance, you can place for instance
onfunction=yourfunction(); into the aI("..." string

Example:
If you place something like
onfunction=javascript:window.open('file.html','mywindow','status=no, toolbar=no, resizable=no, scrollbars=no, location=no, width=200, height=100 ');

on mouseover will activate the window.open - function (if the browser program accepts, displaying the file.html in that window ).

If you would like to make use of certain item_on and item_off information, then of course you need the functions item_off() and item_on(), you can get them by loading the sample page

http://milonic.com/menusample15.php

into your browser and call the source code. (right mouse click - source) and copy it from there.

Michael
Post Reply