<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: How to extend javascript classes</title>
	<atom:link href="http://www.javascriptkata.com/2007/03/21/how-to-extend-javascript-classes/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.javascriptkata.com/2007/03/21/how-to-extend-javascript-classes/</link>
	<description>Advanced katas for javascripters</description>
	<lastBuildDate>Fri, 30 Jul 2010 18:10:52 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
	<item>
		<title>By: skid</title>
		<link>http://www.javascriptkata.com/2007/03/21/how-to-extend-javascript-classes/comment-page-1/#comment-13</link>
		<dc:creator>skid</dc:creator>
		<pubDate>Fri, 16 Nov 2007 02:42:02 +0000</pubDate>
		<guid isPermaLink="false">http://javascriptkata.timmyontime.com/?p=8#comment-13</guid>
		<description>Hi,

Thanks for all your info.

I tried to make something similar, but not with strings, with objects. I wanted a function to set the alpha for a DIV.

It sounds like this:

Object.prototype.setAlpha = function (alpha) {
	this.style.filter = &#039;alpha(opacity: &#039; + alpha + &#039;)&#039;;
	this.style.MozOpacity = alpha / 100;
    	this.style.KhtmlOpacity = alpha / 100;
	this.style.opacity = alpha / 100;
}

and I call it with: bgDiv.setAlpha(80);

Works in FF but doesn&#039;t in IE (6). :(
Anyway, the content of the function is irrelevant, as the call of the function itself is the problem and gives the error in IE.

Any ideas?</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>Thanks for all your info.</p>
<p>I tried to make something similar, but not with strings, with objects. I wanted a function to set the alpha for a DIV.</p>
<p>It sounds like this:</p>
<p>Object.prototype.setAlpha = function (alpha) {<br />
	this.style.filter = &#8216;alpha(opacity: &#8216; + alpha + &#8216;)&#8217;;<br />
	this.style.MozOpacity = alpha / 100;<br />
    	this.style.KhtmlOpacity = alpha / 100;<br />
	this.style.opacity = alpha / 100;<br />
}</p>
<p>and I call it with: bgDiv.setAlpha(80);</p>
<p>Works in FF but doesn&#8217;t in IE (6). <img src='http://www.javascriptkata.com/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /><br />
Anyway, the content of the function is irrelevant, as the call of the function itself is the problem and gives the error in IE.</p>
<p>Any ideas?</p>
]]></content:encoded>
	</item>
</channel>
</rss>
