Solved

Coldfusion and Javascript

Posted on 2007-04-05
1
150 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying 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

Suggested Solutions

Title # Comments Views Activity
Service "nameserver" appears to be down 4 631
Google Crawl Errors Producing 404 Errors 4 84
Use System DSN 6 89
Configure IIS to process JSON 10 90
In our day to day coding, how many times have we come across a necessity to check whether a URL is a broken link or not? For those of you that answered countless and are using ColdFusion like myself, then this article is for you.  It will show yo…
Lease-to-own eliminates the expenditure of hardware replacement and allows you to pay off the server over time. Usually, this is much cheaper than leasing servers. Think of lease-to-own as credit without interest.
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…
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…

821 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