Sigma Visual Manual sigmasoft logo

Contents

How to add an event handler

In this section, you will learn how to create a web application with following feature.

  • This application has one button with caption "say something".
  • When user clicks that button, an asynchronous message box drops down from top of web page saying "hello, world". 

After you add a button component to your web page by dragging it from [Tool Box], a button will appear on your web page. Click the button to select it.

  • Click the plus before [events] in [Component Config Window], then all the event for button will collapse.
  • Click [eventsonClick] and then value of [event onClick] will be highlighted, as the following figure shows.

add an event handler

  • Click the button on the right side to pop up a dialog like the following figure. 
  • Input the following text.

function (profile, e, value) {

            linb.message("hello, world");

}

 

  • Press [OK] button to close window and save event handler code. 
  • Press [Run] button to preview result.