Solved

Coldfusion and Javascript

Posted on 2007-04-05
1
148 Views
Last Modified: 2013-12-24
I am populating a navigation drop down menu using javascript as such: (My question begins below at Menu[4]

Menu Item 1:
<li id="navtickets">
     <a href="/ticketing/default.cfm" onMouseover="dropdownmenu(this, event, menu1, '150px')" onMouseout="delayhidemenu()">Buy Tickets</a>
</li>

Populating with from dropNav.js:
//Contents for menu 1
var menu1=new Array()
menu1[0]='<a href="subscribe/index.cfm">Subscriptions</a>'
menu1[1]='<a href="ticketing/seriesListing.cfm">Series Tickets</a>'
menu1[2]='<a href="ticketing/singleTickets.cfm">Single Tickets</a>'
menu1[3]='<a href="http:calendar.cfm">Season Calendar</a>'

//Set Season ID to equal that of the season dates you wish to display ie 2008 -2009 SeasonID =3
menu1[4]='<a href="http://www.louisvilleorchestra.org/season.cfm?SeasonID=2">2007-2008 Season</a>'
How can I create or can I create a statement such as
menu1[4]='<a href="http://www.louisvilleorchestra.org/season.cfm?SeasonID=<cfoutput>#APPLICATION.SeasonNo#</cfouput>">2007-2008 Season</a>'
0
Comment
Question by:jabronicus
1 Comment
 
LVL 1

Accepted Solution

by:
abdulraheem earned 500 total points
ID: 18859421
you can't write coldfusion tag in .js file
you need to change the file dropNav.js to dropNav.cfm
and put the  in starting
<cfoutput>

all JS code here
</cfoutput>

then you need to import file in the head tag of html

like this <cfinclude template="dropNav.cfm ">

and remove the <link> tag which include the js file.

I hope you application would run fine.
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
php.ini on ipage hosting 12 47
Configure a Local PHP Interpreter for Phpstorm 2 189
Question to locate the problem 18 81
http to https 3 42
This is a guide to setting up a new WHM/cPanel Server to be used for web hosting accounts. It is intended for web hosting company administrators and dedicated server owners. For under $99 per month (considering normal rate of Big Data Cetnters like …
Meet the world's only “Transparent Cloud™” from Superb Internet Corporation. Now, you can experience firsthand a cloud platform that consistently outperforms Amazon Web Services (AWS), IBM’s Softlayer, and Microsoft’s Azure when it comes to CPU and …
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…

910 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

25 Experts available now in Live!

Get 1:1 Help Now