facebook

How to add an onClick event

💡
Our Forums Have Moved

For help with installation, bugs reports or feature requests, please head over to our new forums.
Genuitec Community on GitHub

  1. MobiOne Archive
  2.  > 
  3. Getting Help – General
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #318601 Reply

    Keith Price
    Member

    How does one add onClick events to a button without using the custom.js
    document.getElementById(‘m1-iPhoneLogin-Login’).onclick = function() { alert();}
    I want a simple :-

    <div id=”m1-iPhoneLogin-Login” class=”m1-clickable m1-push-button m1-button” name=”Login” onClick=”alert();”>Login</div>

    #318606

    support-michael
    Keymaster

    There are some possible negative consequences for adding event handlers directly into the code, especially when the component is on a scrollable panel. There is some tricky logic in supporting quick kinetic scrolling and component selection detection.

    Just as you would call your custom JS function from the Button.Link property with javascript:myfunction() you can use javascript:alert(‘hello world’) or javascript:{ code here }

Viewing 2 posts - 1 through 2 (of 2 total)
Reply To: How to add an onClick event

You must be logged in to post in the forum log in