Platoo FReport ComponentsHTML Events

Contents

This chapter describes events in HTML documents and gives general information on how to use HTML events with FR componnts.


Description
Events that will be handled by the client's browser when a HTML document is processed like (ONLOAD, ONUNLOAD,ONCLICK, MOUSEMOVE...). Each type of HTML elements has its specific set of available events.

When FRComponents are used to develop ISAPI applications, the programmer can have complete access to all events specified in the HTML specification. Event handler functions can be written directly into the element or can be implemented in <SCRIPT> part of the HTML document and referenced from the HTML element.

At design time use properties like ONLOAD, ONUNLOAD,ONCLICK, MOUSEMOVE... to create HTML events. Use runtime events like

OnGetONLOAD, OnGetONUNLOAD,OnGetONCLICK, OnGetMOUSEMOVE... to generate a HTML event dynamically when document is generated. This feature is useful for giving specific parameters to the HTML events.

The event handler sript can be inside the HTML element like:

<INPUT TYPE='BUTTON' ONCLICK="window.alert('Hello!')">

or the actual event handler script can be in the <SCRIPT> part of the HTML document and referenced by function name from HTML element like:

<HTML>

<HEAD>

<SCRIPT LANGUAGE=JAVASCRIPT>

<!--

function Hello()

{

window.alert("Hello!");

}

-->

</SCRIPT>

</HEAD>

<BODY>

<INPUT TYPE='BUTTON' ONCLICK=Hello()>

</BODY>

</HTML>

Functions in SCRIPT part can recieve parameters:

<HTML>

<HEAD>

<SCRIPT LANGUAGE=JAVASCRIPT>

<!--

function TellHim(TellWhat)

{

window.alert(TellWhat);

}

-->

</SCRIPT>

</HEAD>

<BODY>

<INPUT TYPE='BUTTON' ONCLICK=TellHim('Hello World')>

</BODY>

</HTML>

In this case the OnGetONCLICK event can be used to set actual parameters to ONCLICK event by creating dynamically string on left from = sign.

Use TFRStaticText to insert <SCRIPT> section into your HTML document.

HTML events are also used to perform database management and record grouping.