|
Mailing Lists
|
Home /
Groups /
ColdFusion Talk (CF-Talk)
How to fire off onBlur event for CFTEXTAREA
Author: Alex Sorokorensky
Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:58476#317643
I got it to work by moving the javascript code to the parent file (div.cfm) right
after the cfdiv.
Thank you very much for finding this solution.
-Alex
----- Excess quoted text cut - see Original Post for more -----
Author: Alex Sorokorensky
Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:58476#317642
Brad, this code snippet works great by itself.
However, as an additional level of complexity, I need to run that from a cfdiv
which no longer fires off the OnBlur.
There is a parent file called div.cfm which creates the cfdiv and binds to the
file that contains your solution.
<cfdiv bind="url:fckrte.cfm?section=1" bindonload="true"
style="margin-top:10px;">
Any idea what needs to be changed so OnBlur will still work in this setup?
----- Excess quoted text cut - see Original Post for more -----
Author: Brad Wood
Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:58476#317640
CF 8's rich text area uses the FCKEditor. A little digging in their docs
shows you how to do this. You must attach the event after the editor loads
like so:
<cfform format="HTML" name="test">
<cftextarea name="myfield" richtext="Yes"></cftextarea>
</cfform>
<script LANGUAGE="JavaScript" TYPE="text/javascript">
function FCKeditor_OnComplete(editorInstance)
{
editorInstance.Events.AttachEvent( 'OnBlur', handleOnBlur ) ;
}
function handleOnBlur(editorInstance)
{
alert(editorInstance.Name + ' has blurred!');
}
</script>
~Brad
----- Excess quoted text cut - see Original Post for more -----
Author: Alex Sorokorensky
Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:58476#317638
CFTEXTAREA is great in CF8, but there seems to be a bug that the richtext editor
will not react to onBlur events. For a regular textarea it works fine.
Can anyone figure out a workaround for this?
I just have a form with the 1 CFTEXTAREA field and want to submit it onBlur.
-Alex
|
May 24, 2012
|
Latest Fusion Authority Articles
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||