Skip to content

OnClick - cWebHtmlBox

Fires when control is clicked

Type: Event

Parameters

Parameter Type Description
sId String The value of the 'data-ServerOnClick' attribute
sParam String The value of the 'data-OnClickParam' attribute

Syntax

Procedure OnClick String sId String sParam

Description

Fires when the control is clicked.

In order for 'data-OnClick' to fire, you must provide data for the 'data-OnClickParam' attribute.

Sample

This sample shows how the 'data-ServerOnClick' and 'data-OnClickParam' attributes can be used to send server-side (DataFlex code) messages. The example would open the Order view in the AjaxWeb (Order) web sample application.

Object oHtmlLink is a cWebHtmlBox
    Set psHtml to ;
        'Click <a data-ServerOnClick="openview" data-OnClickParam="order">here</a>'

    Set pbServerOnClick to True
    Procedure OnClick String sId String sParam
        //  sId will be "openview" and sParam will be "order"
        Send Show of oOrderView            
    End_Procedure
End_Object