Passing a variable from CF8 to Javascript - How?

Hello Experts!

I'm trying to pass a variable into a JavaScript from ColdFusion8 but am not sure how to do this can any one help?

<script type="text/javascript">

      AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=10,0,12,36','width','1024','height','424','src','flash/#MYCOLDFISIONVARIABLEHERE#','quality','high','pluginspage','http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash','movie','flash/#MYCOLDFISIONVARIABLEHERE#','wmode','transparent' ); //end AC code

</script>

Many thanks!
LVL 9
Sci-Fi-SiAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Andrew MaurerCommented:
Welll you would just make sure it is on a ColdFusion page, and wrap it in a cfoutput tag


<cfoutput>
 
<script type="text/javascript">
 
      AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=10,0,12,36','width','1024','height','424','src','flash/#MYCOLDFISIONVARIABLEHERE#','quality','high','pluginspage','http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash','movie','flash/#MYCOLDFISIONVARIABLEHERE#','wmode','transparent' ); //end AC code
 
</script>
 
</cfoutput>

Open in new window

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Andrew MaurerCommented:
now if you are trying to have a CF page that make javascript calls to  a CF server, maybe using httprequest.. then thats a whole different lesson...
0
azadisaryevCommented:
if you are wrapping the whole <script></script> block in <cfoutput>, don;t forget to double that # in swflash.cab#version!
alternatively, you can wrap just the cf variables in <cfoutput>...
0
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

Andrew MaurerCommented:
azadisaryev is right, double that first # sign.
0
Sci-Fi-SiAuthor Commented:
Superb!

Thanks to all of you for your replies - you stars! I've got my site up and running with a theme for each day now which looks cool...

Again many thanks.
0
Sci-Fi-SiAuthor Commented:
Thanks very much for that!
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Web Development Software

From novice to tech pro — start learning today.