Solved

Coldfusion and Javascript

Posted on 2007-04-05
1
147 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
Comment Utility
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

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

If you don't have the right permissions set for your WordPress location in IIS, you won't be able to perform automatic updates. Here's how to fix the problem.
When it comes to showing a 404 error page to your visitors, you do not want that generic page to show, and you especially do not want your hosting provider’s ad error page to show either. In this article, I will show you how to enable the custom 40…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

744 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

9 Experts available now in Live!

Get 1:1 Help Now