Don,

I am curious, you are referring to the id in the javascript by absolute
name.  Have you tried replacing all of the '
document.getElementById('noteid2')' references with 'this'?

If there is an issue with the noteid2 not being unique, or any other issue
with the id-ing of the element, 'this' will always refer to the element that
the JS is embedded in.

Also, have you run this using a JS debugger like firebug on FF or the
'webdeveloper' addin on FF?

These can help you to see what is breaking when the javascript is being
called.

William

-- 
William E. Seiter
 
Have you ever read a book that changed your life?
Go to: www.winninginthemargins.com
Enter passkey: goldengrove
 
Web Developer / ColdFusion Programmer
http://William.Seiter.com

-----Original Message-----
From: Don L [mailto:[EMAIL PROTECTED] 
Sent: Monday, February 18, 2008 10:30 AM
To: CF-Talk
Subject: Same inline javascript works and not working

The following cf and js code works fine with both IE7 and FF2 (as you can
see it does auto expand of textarea so that the user can view all the data
input)
<cfparam name="rowNum" default="3">
 
<cfform name="cap" id="auto" action="#CGI.script_name#?" method="post">
<cftextarea name="yourWords" id="noteid2" cols="70" rows="#rowNum#"
wrap="hard"                                   
onKeyDown="javascript:if (document.getElementById('noteid2').value.length >
(70 * #rowNum#) && ((document.getElementById('noteid2').rows *
document.getElementById('noteid2').cols) <=
document.getElementById('noteid2').value.length)) 
{document.getElementById('noteid2').rows += 1};"
</cfform>

However, when I incorporate it into a template the auto expand no longer
works, instead the usual scrool bar shows, any idea as to the cause of such
a state?
..cfm?user=30099.21321.4


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:299285
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to