| CFML Reference
|
|
ColdFusion Tags
|
cfapplet
Description
Used in a cfform tag, cfapplet lets you reference custom Java applets that you have registered using the ColdFusion Administrator.
To register a Java applet, open the ColdFusion Administrator and click Applets.
Category
Forms tags
Syntax
<cfapplet appletSource = "applet_name"
name = "form_variable_name"
height = "height_in_pixels"
width = "width_in_pixels"
vSpace = "space_above_and_below_in_pixels"
hSpace = "space_on_each_side_in_pixels"
align = "Left" or "Right" or "Bottom" or "Top" or "TextTop" or "Middle"
or "AbsMiddle" or "Baseline" or "AbsBottom"
notSupported = "message_to_display_for_nonJava_browser"
param_1 = "applet_parameter_name"
param_2 = "applet_parameter_name"
param_n = "applet_parameter_name">
See also
cfform, cfobject, cfservlet
Attributes
| Attribute |
Description |
appletSource
|
Required. The name of the registered applet.
|
name
|
Required. The form variable name for the applet.
|
height
|
Optional. The height of the applet, in pixels.
|
width
|
Optional. The width of the applet, in pixels.
|
vSpace
|
Optional. Space above and below applet, in pixels.
|
hSpace
|
Optional. Space on each side of the applet, in pixels.
|
align
|
Optional. Alignment. Options are:
Left
Right
Bottom
Top
TextTop
Middle
AbsMiddle
Baseline
AbsBottom
|
notSupported
|
Optional. The text to display if a page containing a Java applet-based cfform control is opened by a browser that does not support Java or has Java support disabled. For example:
notSupported = "<B>Browser must support Java to view
ColdFusion Java Applets</B>"
By default, if no message is specified, the following message displays:
<B>Browser must support Java to <BR>
view ColdFusion Java Applets!</B>
|
paramn
|
Optional. The name of a registered parameter for the applet. Specify a parameter only to override parameter values already defined for the applet in the ColdFusion Administrator.
|
Usage
Since Java applets must be pre-registered, the cfapplet tag can be very simple, taking the default parameter values as they were registered in the ColdFusion Administrator. You can also override parameters by invoking them in the cfapplet tag.
Example <!--- This example shows the use of cfapplet --->
<html>
<head>
<title>cfapplet Example</title>
</head>
<body>
<H3>cfapplet Example</H3>
<P>Used in a cfform, cfapplet allows you to reference
custom Java applets that have been previously registered
using the ColdFusion Administrator.
<P>To register a Java applet, open the ColdFusion Administrator
and click the "Applets" link under the "extensions" section.
<P>This example applet copies text that you type into
a form. Type some text, and then click "copy" to see
the copied text.
<cfform action = "copytext.cfm">
<cfapplet appletsource = "copytext" name = "copytext">
</cfform>
</body>
</html>
|
Copyright © 2001, Macromedia Inc. All rights reserved. |
|
|