> i am using a <cfquery> inside a javascript function. Question is how do i
> pass the javascript variable to the cfquery?
> this is an example of the code.
>
> function ChangeSelect(value)
> {
> <cfquery name="GetEmpName" datasource="#DSN#" dbtype="#DBType#">
> select family_name || ' ' || given_name as name
> from table where
> company_code = 'the javascript variable'
> </cfquery>
> }
You know, I never get tired of saying this...
CF=Server Side
JS=Client Side
You need to pass the JS variables to the server to use them, you can't just
assume that it'll work on the page - CF compiles the page and then sends it
to the browser where JS runs
If you want to pass things back, either put them in a URL variable or put
them in a FORM
Remember that this will fall flat on it's face if the user either has JS
turned off or is behind a fire-wall that doesn't allow JS
Philip Arnold
Director
Certified ColdFusion Developer
ASP Multimedia Limited
T: +44 (0)20 8680 1133
"Websites for the real world"
**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.
**********************************************************************
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists