jasch2244
asked on
cfoutput in javascript?
I'm currently using a menu system that utilizes javascript (.js file). I'm using the menu system for a drill down application in coldfusion. My problem is I can't pass a url variable that is dynamic using <cfoutput>#variablename#</ cfoutput>. Is there a work around for this?
I've tried wrapping the javascript reference in the .cfm file in <cfoutput> tags from a previous forum but that does not seem to work.
I've tried wrapping the javascript reference in the .cfm file in <cfoutput> tags from a previous forum but that does not seem to work.
'*../../LISTINGS/Feedback_Service/Admin_Market_Statistics_Center.cfm?charttype=mynkyhome&ListingId=<cfoutput>#ListingID#</cfoutput>','','','',0,0,2,'#ffffff',
ASKER
If I'm understanding you correctly you want me to overwrite the current my.js file with my.cfm file and reference the my.cfm file in the javascript call. If that is what you want me to do... it does not work for this instance, when I do this the drop down menus with the funcitonality in the .js file no longer work.
no... just rename your .js file to .cfm and change your include from
<script type="text/javascript" src="myinclude.js"></scrip t>
to
<script type="text/javascript" src="myinclude.cfm"></scri pt>
<script type="text/javascript" src="myinclude.js"></scrip
to
<script type="text/javascript" src="myinclude.cfm"></scri
ASKER
Exactly this is what I did.... I do have a script that is trying to send a variable into the .js soon to be .cfm file. This might be messing it up how would I correct this being it's a coldfusion variable ? See code snippet.
Also, in the .js file there are multiple references to hexidicimal color values of #660000 do these all need to be changed as well. Not understanding how the javascript is to run if it's coldfusion code now....
Also, in the .js file there are multiple references to hexidicimal color values of #660000 do these all need to be changed as well. Not understanding how the javascript is to run if it's coldfusion code now....
<script type="text/javascript">var PLHFO_ID="PLHFO0"</script>
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Open in new window