Input HTML fields events (click action)



I defined an input field within hype:

<input value="test" id="search-input-field" type="text" style="height:60px; width:884px; padding:0px 10px; border:1px solid; box-shadow:0;" placeholder="xxx?"/>

If I add an action (mouseclick) to it, action will be ignored. Just the input field gets focused. Can anybody help? Thanks.


Input fields will override an Onclick event unless you specifically handle it in the Input element itself. Here’s more info about how to control input forms with JavaScript:

You may need to convert your action to Javascript and run it directly within the input form instead of using Hype’s built in action menu.


yes, I thought so.

But then how do I trigger it, for i.e.

<input id="search-input-field" type="text" onFocus="HYPE.documents['mydocument'].startTimelineNamed('tapSearch', hypeDocument.kDirectionReverse)"/>

For that I get

Uncaught ReferenceError: HYPE is not defined