Object: hsVariables
Functions
EventsObject: hs.ExpanderVariablesFunctionsEvents
|
hs.onKeyDownFires when at least one expander is open and a key is pressed.
bool hs.onKeyDown(object sender, object e)
By default Highslide interacts on the following keys, with the keyCode in parenthesis:
hs.getExpander() .Details
Parameters
ExampleOutput the entered key code to the captionWe return false to prevent Highslide from doing the default actions. This also means that since Highslide is not capturing the event, for example Page Up will do the browser's default action. Put this in the head section of your HTML page: <script type="text/javascript"> hs.onKeyDown = function (sender, e) { var exp = hs.getExpander(); exp.caption.innerHTML = "You just hit the key with the following key code: <b>"+ e.keyCode +"</b"; return false; } </script> Open the expander and hit any key to see the results: |