summaryrefslogtreecommitdiffstats
path: root/helpcontent2/source/text/shared/02/01170700.xhp
blob: a9a35a43cf805bbca456b7830f2e23345eceec34 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
<?xml version="1.0" encoding="UTF-8"?>
<!--***********************************************************************
 *
 *  The Contents of this file are made available subject to the terms of
 *  either of the following licenses
 *
 *         - GNU Lesser General Public License Version 2.1
 *         - Sun Industry Standards Source License Version 1.1
 *
 *  Sun Microsystems Inc., October, 2000
 *
 *  GNU Lesser General Public License Version 2.1
 *  =============================================
 *  Copyright 2000 by Sun Microsystems, Inc.
 *  901 San Antonio Road, Palo Alto, CA 94303, USA
 *
 *  This library is free software; you can redistribute it and/or
 *  modify it under the terms of the GNU Lesser General Public
 *  License version 2.1, as published by the Free Software Foundation.
 *
 *  This library is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 *  Lesser General Public License for more details.
 *
 *  You should have received a copy of the GNU Lesser General Public
 *  License along with this library; if not, write to the Free Software
 *  Foundation, Inc., 59 Temple Place, Suite 330, Boston,
 *  MA  02111-1307  USA
 *
 *
 *  Sun Industry Standards Source License Version 1.1
 *  =================================================
 *  The contents of this file are subject to the Sun Industry Standards
 *  Source License Version 1.1 (the "License"); You may not use this file
 *  except in compliance with the License. You may obtain a copy of the
 *  License at http://www.openoffice.org/license.html.
 *
 *  Software provided under this License is provided on an "AS IS" basis,
 *  WITHOUT WARRUNTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING,
 *  WITHOUT LIMITATION, WARRUNTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
 *  MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
 *  See the License for the specific provisions governing your rights and
 *  obligations concerning the Software.
 *
 *  The Initial Developer of the Original Code is: Sun Microsystems, Inc..
 *
 *  Copyright: 2000 by Sun Microsystems, Inc.
 *
 *  All Rights Reserved.
 *
 *  Contributor(s): _______________________________________
 *
 *
 ************************************************************************--><helpdocument version="1.0">
<meta>
<topic id="textshared0201170700xml" indexer="include" status="PUBLISH">
<title xml-lang="en-US" id="tit">HTML Filters and Forms</title>
<filename>/text/shared/02/01170700.xhp</filename>
</topic>
<history>
<created date="2003-10-31T00:00:00">Sun Microsystems, Inc.</created>
<lastedited date="2003-10-31T00:00:00">converted from old format - fpe</lastedited>
</history>
</meta>
<body>
  
  
  <bookmark xml-lang="en-US" branch="index" id="bm_id3163829"><bookmark_value>forms; HTML filters</bookmark_value></bookmark><paragraph role="heading" level="1" id="hd_id3163829" l10n="U" xml-lang="en-US" oldref="1">HTML Filters and Forms</paragraph>
  <paragraph role="paragraph" id="par_id3147285" l10n="U" xml-lang="en-US" oldref="2">You can use all control element 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.</paragraph>
  <paragraph role="paragraph" id="par_id3150616" l10n="U" xml-lang="en-US" oldref="3">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</paragraph>
  <paragraph role="paragraph" id="par_id3147571" l10n="U" xml-lang="en-US" oldref="4">SDEvent-XListener-method = &quot;/* event-code */&quot;</paragraph>
  <paragraph role="paragraph" id="par_id3152425" l10n="U" xml-lang="en-US" oldref="5">Note that the XListener- and method components of this option are case sensitive.</paragraph>
  <paragraph role="paragraph" id="par_id3153683" l10n="U" xml-lang="en-US" oldref="6">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 &quot;Listener&quot; 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.</paragraph>
  <paragraph role="paragraph" id="par_id3156410" l10n="U" xml-lang="en-US" oldref="7">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</paragraph>
  <paragraph role="paragraph" id="par_id3150506" l10n="U" xml-lang="en-US" oldref="8">&lt;INPUT TYPE=text ONFOCUS=&quot;/* code */&quot;</paragraph>
  <paragraph role="paragraph" id="par_id3154289" l10n="U" xml-lang="en-US" oldref="9">rather than through the</paragraph>
  <paragraph role="paragraph" id="par_id3155391" l10n="U" xml-lang="en-US" oldref="10">&lt;INPUT TYPE=text SDEvent-XFocusListener-focusGained=&quot;/* code */&quot;</paragraph>
  <paragraph role="paragraph" id="par_id3152996" l10n="U" xml-lang="en-US" oldref="11">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:</paragraph>
  <paragraph role="paragraph" id="par_id3150443" l10n="U" xml-lang="en-US" oldref="12">&lt;META HTTP-EQUIV=&quot;content-script-type&quot; CONTENT=&quot;...&quot;&gt;</paragraph>
  <paragraph role="paragraph" id="par_id3166410" l10n="U" xml-lang="en-US" oldref="13">As CONTENT you can, for example, use &quot;text/x-StarBasic&quot; for $[officename] Basic or a &quot;text/JavaScript&quot; for JavaScript. If no entry is made, JavaScript is assumed.</paragraph>
  <paragraph role="paragraph" id="par_id3146797" l10n="U" xml-lang="en-US" oldref="14">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.</paragraph>
 </body>
</helpdocument>