I need to dynamically create some javascript adding event handlers to form
elements.  So, I do something like so in CF Code:

<cfscript>
        for (field in Form) {
                WriteOutput("document.forms[0].#field#.onclick = EventHandler;
        }
</cfscript>

now, this works fine, and I get the javascript block I'm expecting.
However, the #field# section translates to an UPPER case field name.  This
would be fine, if my form elements were also in uppercase.  But, they are
using mixed case. (and having 200+ form elements will result in a great deal
of time to convert these to all upper case)

Is there anyway to make CF output the name of a form element using the
"original" case??

I've worked around this for now using some creative JS and an associative
array, but if I can avoid that, my page is already doing too much, and a
little slow to load as it is - I need to optimize this where I can.

Thanks in advance.

Shawn Grover

______________________________________________________________________
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to