Javascript String Termination Error Spanish Characters with ASP.NET

G

Garth17

This totally surprised me. I'm using IE 6.
I built a really simple test.aspx page that had a javascript block in
it like this:
<script language=javascript src="spanish.js"></script>


Inside the spanish.js I had 1 line that set a variable to a spanish
character.

var Test = "á";

When the browser loaded the page it gave an Unterminated String
Constant Error.

Now if I instead create the file as an .htm. IE will not spawn the
error.
Also if I replace with:
<script language=javascript >var Test = "á";</script>
in the .aspx file I will not get the error.

Any Ideas?

Why would IE treat javascript src files different when loading them
from .aspx or .htm page? It is the same client side code.

Is asp.net telling IE something that makes it handle international
characters differently on the client side?
 

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,582
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top