<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Waterford Web Design &#187; Javascript</title>
	<atom:link href="http://www.waterfordwebdesign.ie/category/javascript/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.waterfordwebdesign.ie</link>
	<description>Professional Web Advice from a Web Developer in the Waterford Area</description>
	<lastBuildDate>Fri, 06 Jan 2012 10:51:13 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Putting Euro Symbol in Inner Text HTML using Javascript</title>
		<link>http://www.waterfordwebdesign.ie/putting-euro-symbol-in-innertext-html-javascrip/</link>
		<comments>http://www.waterfordwebdesign.ie/putting-euro-symbol-in-innertext-html-javascrip/#comments</comments>
		<pubDate>Tue, 06 Jul 2010 14:58:58 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://www.waterfordwebdesign.ie/?p=159</guid>
		<description><![CDATA[Had a problem today whereby I tried to insert a euro symbol into the innertext of a div using javascript. First I tried the actual euro symbol e.g. document.getElementById('theelementid').innerText ="€" + value; This results in the user agent outputting an &#8230; <a href="http://www.waterfordwebdesign.ie/putting-euro-symbol-in-innertext-html-javascrip/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Had a problem today whereby I tried to insert a euro symbol into the innertext of a div using javascript.</p>
<p>First I tried the actual euro symbol</p>
<p>e.g.</p>
<pre>document.getElementById('theelementid').innerText ="€" + value;</pre>
<p>This results in the user agent outputting an unrecognised symbol in place of the euro</p>
<p>Then I tried using the html escape code for the euro symbol:</p>
<p>i.e.</p>
<pre>document.getElementById('theelementid').innerText ="&amp;euro;" + value;</pre>
<p>But that resulted in the &amp;euro; being displayed verbatim by the browser as the DOM automatically encodes special characters such as the ampersand</p>
<p>Finally, I actually escaped it using the unicode value</p>
<p>i.e.</p>
<pre>document.getElementById('theelementid').innerText ="\u20AC" + value;</pre>
<p>and it worked like a treat.</p>
<p> <img src='http://www.waterfordwebdesign.ie/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<div id="_mcePaste" style="overflow: hidden; position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px;">http://www.thejesusalien.com/michael-jackson-is-not-dead-hes-an-ancient-egyptian-princess/</div>
]]></content:encoded>
			<wfw:commentRss>http://www.waterfordwebdesign.ie/putting-euro-symbol-in-innertext-html-javascrip/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

