Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CF variables in javascript

Status
Not open for further replies.

chebbi

Programmer
Feb 6, 2002
98
IN
Hi

How can you insert a CF variable in javascript? I would ideally want something like this

document.getElementById("maindiv").innerHTML=#CFvariable#; Badrinath Chebbi
 
Hi Chebbi,
You should just simply have to put <cfoutput> tags around the javascript code or script and it will parse any variables placed in your pound signs. This works for me. Good luck!

Jami
 
Read FAQ #1. It talks about using CF variables in JavaScript. Click on the link under any message. Calista :-X
Jedi Knight,
Champion of the Force
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top