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 2 of 2
  1. #1
    New Coder
    Join Date
    Feb 2011
    Posts
    38
    Thanks
    8
    Thanked 0 Times in 0 Posts

    Question Can you use the <a> element's charset attr to display the linked document...

    Can you use the <a> element's "charset" attr to display the linked document in another language (hypothetically)? I know currently no major browsers support this attribute of the anchor tag, but I'm writing a web coding program in which I will need to know info like this about the charset attr (i.e. what exactly its for, since the description of it is kind of vague on most websites I've visited), in case browsers start supporting it in the future.

  • #2
    New Coder
    Join Date
    Feb 2011
    Posts
    38
    Thanks
    8
    Thanked 0 Times in 0 Posts
    Ok, this is really annoying...
    I finally found some info on the <a> element's "charset" attribute for IE in this Microsoft article, which states in the "Remarks" that in IE 6, "the property now applies to the a, link, and script objects", so I assume the version of IE I'm coding for (IE 8.0) supports the charset attribute, and yet the only description that it provides is the following:

    Gets or sets the character set used to encode the object.
    Now that's as vague a description as they get.
    I wrote a test.html file which I opened in IE that declares an <a> element with a "charset" attr, but when I click on the link, it definitely does not open the link with the character set of the linked document set to Japanese, and the charset attr doesn't appear to do anything.
    The <a> element I wrote looks like this:
    Code:
    <a href="http://www.google.com" id="C_Google_link" class="C_Google_link" charset="ISO-2022-JP">Click this link to go to Google.com</a>
    In addition, it says you have to "set" the value of this property before you can retrieve it, but it doesn't say how exactly to do that.

    What a pain...
    Last edited by CoderInTraining; 02-14-2011 at 03:57 AM.


  •  

    Posting Permissions

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