Ethan,
A CF variable only exists on the server, a JavaScript onChange event only
exists on the browser. Therefore the statement that you showed will not
work. You can however use a JavaScript function to change the action
attribute of a form or the href of an anchor tag and append the variable and
it's value as url variables that are available on the server.
Another alternative would be to use WDDX which would allow you to pass
values back and forth between the CF environment on the server and the
JavaScript environment of the browser.
-Peter Amiri
[EMAIL PROTECTED]
Amiri Industries, Inc. 949.360.0064 - Voice
27881 La Paz Road, Suite G, #312 949.363.9923 - Fax
Laguna Niguel, CA 92677 www.amiri.net
> -----Original Message-----
> From: Ethan Rosch [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, March 28, 2001 4:11 PM
> To: CF-Talk
> Subject: javascript to set cfvariable?
>
>
> can I use javacript to set a cfvariable?
>
> eg.
>
> onChange='<CFSET var=1>'
>
>
>
> thanks in advance...
>
> e
>
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists