Input HTML fields events (click action)

Hi,

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: http://stackoverflow.com/questions/10637900/onclick-event-to-remove-default-value-in-a-text-input-field

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

Thanks.