|
-
May 22nd, 2002, 08:41 AM
#1
Special characters in DHTML
Hi there !
I'm facing some strange behaviour in respect of displaying special characters like the 'umlauts' in German (ä, ö, ü etc.).
When I'm allocating such a character "statically" within a title attribute of an HTML control, everything works quite fine, e.g.:
<button name="back" style="border:0; background:transparent; cursor:hand" title="R&uuml;ck">
Hovering over this button at runtime unveils a proper "Rück" as the corresponding tooltip. Trying to alter the title contents dynamically via JScript however, doesn't translate the character code into the umlaut:
back.title = "Zur&uuml;ck";
The tooltip then contains "Zur&uuml;ck" instead of "Zurück".
Moreover, an "alert" out of JScript behaves likewise. "alert('Zur&uuml;ck');" activates an IE message box displaying "Zur&uuml;ck". Using the umlaut character directly in the source code ("alert('Zurück');") results in a partly "illegible" string, whereas "alert('&');" (non-masked ampersand) is shown as "&".
It looks like a browser bug !? I'm working with Internet Explorer 6 under WINNT 4.0 SP6a, both German language version.
I'd be grateful for any tips and suggestions. Thanks in advance.
Last edited by HEJ; May 23rd, 2002 at 09:34 AM.
Regards
Hendrik
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|