Special characters don't get thru from included script files in .aspx?

T

tonicvodka

Hi all!

I'm including an array of names of cities to a page with two dropdown
boxes. Chosing a larger city in the first dropdown populates the second
one with smaller cities. This works fine if the page is called
Cities.htm. But when it's called Cities.aspx it doesn't understand
the special character: É.

I have minimized the error to just alerting a city name from the script
file as shown below:

Cities.htm:
<HTML>
<HEAD>
<title>TEST</title>
<script type="text/javascript" src="ListCities.js"></script>
<script>function ShowCity(){alert(strCity);}</script>
</HEAD>
<body onload="ShowCity();"></body>
</HTML>

ListCities.js:
var strCity = "Él Paso";

If you now insert the script-code into a .aspx file it won't show the
é-character. Now paste the "Él Paso" directly in and it works fine!
What's happening?

Thanks for any help,
Niclas Colleen
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,576
Members
45,054
Latest member
LucyCarper

Latest Threads

Top