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.
<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">
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.
<!--- 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>