HTML Special Characters in Dynamically Populated DropDowns

J

jeffejohnson

I'm looking to see if anyone has experienced this...

I've got a dropdown that I'm populating dynamically and the items
include HTML special characters (like Ô). If I load them from an
existing JavaScript array I don't have any problems, but I'm generating
the arrays dynamically, then populating my dropdown dynamically with
the onload event.

I've tried setting multiple encodings in the meta tag with no success.

Please let me know if you have a solution.

Thanks,

Jeff
 
V

VK

I'm looking to see if anyone has experienced this...

I've got a dropdown that I'm populating dynamically and the items
include HTML special characters (like Ô). If I load them from an
existing JavaScript array I don't have any problems, but I'm generating
the arrays dynamically, then populating my dropdown dynamically with
the onload event.

I've tried setting multiple encodings in the meta tag with no success.

Please let me know if you have a solution.

JavaScript operates with Unicode characters only and exclusively; it
doesn't matter what the page encoding is or what input is in form
elements: it "sees" it as Unicode.

So either type in Unicode characters directly or use Unicode escape
sequences \uXXXX
 

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

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,073
Latest member
DarinCeden

Latest Threads

Top