CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 9 of 9

Threaded View

  1. #1
    Join Date
    May 2002
    Location
    Frankfurt, Germany
    Posts
    4

    Unhappy 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&amp;uuml;ck">

    Hovering over this button at runtime unveils a proper "R&uuml;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&amp;uuml;ck";

    The tooltip then contains "Zur&amp;uuml;ck" instead of "Zur&uuml;ck".

    Moreover, an "alert" out of JScript behaves likewise. "alert('Zur&amp;uuml;ck');" activates an IE message box displaying "Zur&amp;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
  •  





Click Here to Expand Forum to Full Width

Featured