Hi,
I got trouble when I try to do a client side javaScript validation and use
the cfa_HtmlEditor to edit the textarea field at the same time.
The content in the text box on cfa_htmlEditor cannot be saved when I use
onClick as the event to submit the form. The validation function is ignored
when I use onSubmit as the event to submit the form.
I am not sure if I have to use the onSubmit event when I use cfa_HtmlEditor
in the form.
Can anybody help me to solve the problem? I list the two case below.
****************************************************************************
****************************
Case 1 (use onClick)
<script language="JavaScript">
function Validator(form){
//check the content on the name field
}
</script>
<form name="formContent" action="#cgi.SCRIPT_NAME##queryString#"
method="post">
Name: <input type="text" name="Name" value="#stObject.Label#" size="50">
Description: <cfa_HtmlEditor
name = "Description"
height = "250"
width = "680"
value = "#stObject.Description#"
bObjectPicker=false
bImagePicker=true
>
<input type="button" name="btnUpdate" value="Update"
onClick="Validator(this.form)">
</form>
Case 2 (use onSubmit)
<script language="JavaScript">
function Validator(form){
//check the content on the name field
}
</script>
<form name="formContent" action="#cgi.SCRIPT_NAME##queryString#"
method="post" onSubmit="return Validator(this.form)">
Name: <input type="text" name="Name" value="#stObject.Label#" size="50">
Description: <cfa_HtmlEditor
name = "Description"
height = "250"
width = "680"
value = "#stObject.Description#"
bObjectPicker=false
bImagePicker=true
>
<input type="submit" name="btnUpdate" value="Update">
</form>
****************************************************************************
********************************
Thanks in advance.
Zhiyuan Ma
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
------------------------------------------------------------------------------
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/spectra_talk or send a
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.