dcsimg
Results 1 to 3 of 3

Thread: [RESOLVED] How to assign a HTML symbol value to a <span> tag

  1. #1

    Thread Starter
    PowerPoster
    Join Date
    Jan 2004
    Location
    Southern California
    Posts
    4,918

    Resolved [RESOLVED] How to assign a HTML symbol value to a <span> tag

    I'm trying to execute the following statement:

    HTML Code:
    document.getElementById("s1").innerHTML = &#x25B6;
    I'm getting this error: Uncaught SyntaxError: Unexpected token '&'

    The character is a Left Pointing Black Arrow. How do I assign that value?

    Thanks,
    Blake

  2. #2
    Software Carpenter dee-u's Avatar
    Join Date
    Feb 2005
    Location
    Candon City, Ilocos Sur, Phils.
    Posts
    11,025

    Re: How to assign a HTML symbol value to a <span> tag

    Have you tried wrapping the hex with single quote?
    Code:
    document.getElementById("s1").innerHTML = '&#x25B6';
    Works for me.
    Regards,


    As a gesture of gratitude please consider rating helpful posts. c",)

    Some stuffs: Mouse Hotkey | Compress file using SQL Server! | WPF - Rounded Combobox | WPF - Notify Icon and Balloon | NetVerser - a WPF chatting system

  3. #3

    Thread Starter
    PowerPoster
    Join Date
    Jan 2004
    Location
    Southern California
    Posts
    4,918

    Re: How to assign a HTML symbol value to a <span> tag

    That worked dee-u....thanks! I forgot about the single quotes. I was using the double quotes!
    Blake

Posting Permissions

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



Featured


Click Here to Expand Forum to Full Width