Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    New Coder
    Join Date
    Oct 2012
    Location
    Basement
    Posts
    88
    Thanks
    9
    Thanked 0 Times in 0 Posts

    € not showing correctly.

    My € shows as: €
    same as é shows as: i�

    How do i fix this..?

    Click on a seat here to test:

    http://www.bioscoop-filmpje.allalla....eer_groot.html

  • #2
    Supreme Master coder! Philip M's Avatar
    Join Date
    Jun 2002
    Location
    London, England
    Posts
    18,309
    Thanks
    203
    Thanked 2,563 Times in 2,541 Posts
    ALT 0128 is Euro symbol in HTML.

    <script type = "text/javascript">
    alert('\u20AC'); // Euro symbol
    </script>


    "There is hardly anything in the world that some man cannot make a little worse and sell a little cheaper, and the people who consider price only are this man's lawful prey." John Ruskin
    Last edited by Philip M; 11-04-2012 at 07:01 PM.

    All the code given in this post has been tested and is intended to address the question asked.
    Unless stated otherwise it is not just a demonstration.

  • Users who have thanked Philip M for this post:

    optimizer123 (11-04-2012)

  • #3
    New Coder
    Join Date
    Oct 2012
    Location
    Basement
    Posts
    88
    Thanks
    9
    Thanked 0 Times in 0 Posts
    I got this:

    Code:
    document.getElementById('seatcounter').innerHTML = "€ " + total;
    yesterday it showed fine, but not now (as u can see on the website)

  • #4
    Master Coder felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, Australia
    Posts
    6,642
    Thanks
    0
    Thanked 649 Times in 639 Posts
    You must use the unicode value if you want that character to always appear correctly as Philip already told you.

    Code:
    document.getElementById('seatcounter').innerHTML = "\u20AC " + total;
    Stephen
    Learn Modern JavaScript - http://javascriptexample.net/
    Helping others to solve their computer problem at http://www.felgall.com/

    Don't forget to start your JavaScript code with "use strict"; which makes it easier to find errors in your code.

  • Users who have thanked felgall for this post:

    optimizer123 (11-04-2012)

  • #5
    New Coder
    Join Date
    Oct 2012
    Location
    Basement
    Posts
    88
    Thanks
    9
    Thanked 0 Times in 0 Posts
    Awesome thanks!

    on to the next question


  •  

    Posting Permissions

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