As a followup, you can reference CF variables inside of javascript while the
page is being built. For example...
<cfset foo = "bar" />
<script type="text/javascript">
var foo = <cfoutput>"#foo#"</cfoutput>;
if (foo == "bar2") {
// do stuff
}
</script>
Hope that helps.
-----Original Message-----
From: Matt Quackenbush [mailto:[EMAIL PROTECTED]
Sent: Thursday, September 21, 2006 1:50 PM
To: CF-Talk
Subject: RE: Javascript vs. cfscript
Javascript is client-side. Cfscript is server-side. They do NOT
communicate with each other. The only way to get javascript to talk to CF
is to use AJAX.
-----Original Message-----
From: Richard White [mailto:[EMAIL PROTECTED]
Sent: Thursday, September 21, 2006 1:36 PM
To: CF-Talk
Subject: Re: Javascript vs. cfscript
i am wondering if you can intergrate the 2. Basically i have a structure in
coldfusion which holds all the information ready to be saved, however i want
to reference this in javascript. I need to reference it in a javascript
function which says that if the structure value is equal to x then
document.getElementByID(...)...
therefore i was wondering it is it possible to combine the 2 together, or
whether i maybe have create a cfscript function and a javascript function
and send calls between them. thanks
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four
times a year.
http://www.fusionauthority.com/quarterly
Archive:
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:253778
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4