SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SQL Consultant gold trophysilver trophybronze trophy
    r937's Avatar
    Join Date
    Jul 2002
    Location
    Toronto, Canada
    Posts
    39,350
    Mentioned
    63 Post(s)
    Tagged
    3 Thread(s)

    why won't the special characters show properly

    test page: http://rudy.ca/quatschdichaus.html

    when you press the button, the javascript function uses getElementById and childNode.nodeValue to replace the text in the box

    (you may have to hit it a few times, there's only 4 elements in the array, it is picking one at random)

    works in firefox, still have a problem in internet explorer (had it working momentarily)

    but the main question is: how do i make it actually show the special characters properly?
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL
    "giving out my real stuffs"

  2. #2
    CSS & JS/DOM Adept bronze trophy
    Join Date
    Mar 2005
    Location
    USA
    Posts
    5,482
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Check out this thread.

    P.S. It's best to avoid using inline event handlers. I suggest you read up on Unobtrusive JavaScript and other JavaScript Best Practices.
    We miss you, Dan Schulz.
    Learn CSS. | X/HTML Validator | CSS validator
    Dynamic Site Solutions
    Code for Firefox, Chrome, Safari, & Opera, then add fixes for IE, not vice versa.

  3. #3
    SQL Consultant gold trophysilver trophybronze trophy
    r937's Avatar
    Join Date
    Jul 2002
    Location
    Toronto, Canada
    Posts
    39,350
    Mentioned
    63 Post(s)
    Tagged
    3 Thread(s)
    Quote Originally Posted by Kravvitz View Post
    you know, it never occurred to me to search any other board but sitepoint

    Quote Originally Posted by Kravvitz View Post
    P.S. It's best to avoid using inline event handlers.
    as soon as i digest the resource you've pointed me to, and assuming i can understand what it's saying, i will


    thanks
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL
    "giving out my real stuffs"

  4. #4
    CSS & JS/DOM Adept bronze trophy
    Join Date
    Mar 2005
    Location
    USA
    Posts
    5,482
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You're welcome

    I didn't search the forums. I remembered seeing this question before, so I searched the text file where I keep information like this and I found the URL to that thread.

    If you have any questions about what that best practices page says, feel free to ask.
    We miss you, Dan Schulz.
    Learn CSS. | X/HTML Validator | CSS validator
    Dynamic Site Solutions
    Code for Firefox, Chrome, Safari, & Opera, then add fixes for IE, not vice versa.

  5. #5
    SQL Consultant gold trophysilver trophybronze trophy
    r937's Avatar
    Join Date
    Jul 2002
    Location
    Toronto, Canada
    Posts
    39,350
    Mentioned
    63 Post(s)
    Tagged
    3 Thread(s)
    thanks

    i do understand unobtrusive now, too, thanks

    meanwhile, i've had the good fortune to get a speedy reply from ppk, whom i've known for, ah, ages, who says to use innerHTML, not nodeValue

    nice to have solutions to choose from

    not looking forward to unicoding my data, though

    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL
    "giving out my real stuffs"


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •