From ed5640d8b587fbcfed7dd7967f3de04b37a76f26 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 11:06:44 +0200 Subject: Adding upstream version 4:7.4.7. Signed-off-by: Daniel Baumann --- helpcontent2/source/text/shared/02/01170700.xhp | 49 +++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 helpcontent2/source/text/shared/02/01170700.xhp (limited to 'helpcontent2/source/text/shared/02/01170700.xhp') diff --git a/helpcontent2/source/text/shared/02/01170700.xhp b/helpcontent2/source/text/shared/02/01170700.xhp new file mode 100644 index 000000000..5c988d37c --- /dev/null +++ b/helpcontent2/source/text/shared/02/01170700.xhp @@ -0,0 +1,49 @@ + + + + + + + + + + +HTML Filters and Forms +/text/shared/02/01170700.xhp + + + +forms; HTML filters + +HTML Filters and Forms +You can use all control elements and form events in HTML documents. There have been numerous events to date (for example, focus events), which have not been changed. They will continue to be imported and exported as ONFOCUS, ONBLUR, and so on for JavaScript and as SDONFOCUS, SDONBLUR, and so on for $[officename] Basic. +Generic names that consist of the Listener interface and the method name of the event are used for all other events: An event registered as XListener::method is exported as +SDEvent-XListener-method = "/* event-code */" +Note that the XListener- and method components of this option are case sensitive. +Event handling of controls is performed using the $[officename] API. If you assign an event to a control, an object registers itself internally as a "Listener" for a specific control event. To do this, the object must use a specific interface, for example the XFocusListener Interface, so that it can react to focus events. When the event occurs, the control then invokes a special method of the Listener interface when the control receives the focus. The internally registered object then invokes the JavaScript or $[officename] Basic code, which was assigned to the event. +The HTML filter now uses precisely these listener interfaces and method names so that it can import and export events as desired. You can register a focus event through +<INPUT TYPE=text ONFOCUS="/* code */" +rather than through the +<INPUT TYPE=text SDEvent-XFocusListener-focusGained="/* code */" +register. Events can therefore be registered as desired, including those not offered in the list boxes. To define the script language of events, you can write the following line in the document header: +<META HTTP-EQUIV="content-script-type" CONTENT="..."> +As CONTENT you can, for example, use "text/x-StarBasic" for $[officename] Basic or a "text/JavaScript" for JavaScript. If no entry is made, JavaScript is assumed. +During exporting, the default script language will be defined based on the first module found in macro management. For events, only one language can be used per document. + + -- cgit v1.2.3