Solved

Coldfusion and Javascript

Posted on 2007-04-05
1
151 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

One of the typical problems I have experienced is when you have to move a web server from one hosting site to another. You normally prepare all on the new host, transfer the site, change DNS and cross your fingers hoping all will be ok on new server…
Periodically we have to update or add SSL certificates for customers. Depending upon your hosting plan you may be responsible for the installation and/or key generation. In the wake of Heartbleed many sites were forced to re-key. We will concen…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

739 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