Search the archives!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Javascript] createTextNode and special characters
- From: javascript@xxxxxxxxxx (Immanuel Normann)
- Subject: [Javascript] createTextNode and special characters
- Date: Fri, 24 May 2002 15:33:18 +0200
Hello,
I want to create dynamically text with special characters like ä
Therefore I want to use document.createTextNode('ä');
The following code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<script type="text/javascript">
function showUml() {
var t = document.createTextNode('ä');
document.body.appendChild(t);
}
</script>
</head>
<body onload='showUml()'>ä
</body>
</html>
should give me the respectiv single symbol onload, but what I see in my
browser (Mozilla 1.0 rc2) is actually the 8-character long text: 'ä'
How could I change this?
(document.createTextNode('ü'); doesn't help
document.createEntityReference('ü'); yields an javascript error)
Thanks for help,
Normann
- Follow-Ups:
- [Javascript] createTextNode and special characters
- From: J. Lester Novros II
- [Javascript] createTextNode and special characters
- Prev by Date: [Javascript] innerwidth
- Next by Date: [Javascript] Optimization problem
- Previous by thread: [Javascript] innerwidth
- Next by thread: [Javascript] createTextNode and special characters
- Index(es):