<?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>killthemessenger &#187; Code</title>
	<atom:link href="http://killthemessenger.net/blog/category/code/feed/" rel="self" type="application/rss+xml" />
	<link>http://killthemessenger.net/blog</link>
	<description>Mine is the only advice I ever listen to</description>
	<lastBuildDate>Tue, 02 Nov 2010 00:01:59 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Alpha Transparency for PNG’s in IE6</title>
		<link>http://killthemessenger.net/blog/2010/05/05/alpha-transparency-for-pngs-in-ie6/</link>
		<comments>http://killthemessenger.net/blog/2010/05/05/alpha-transparency-for-pngs-in-ie6/#comments</comments>
		<pubDate>Wed, 05 May 2010 21:56:04 +0000</pubDate>
		<dc:creator>craig</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[alpha]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[ie6]]></category>
		<category><![CDATA[png]]></category>
		<category><![CDATA[transparency]]></category>

		<guid isPermaLink="false">http://killthemessenger.net/blog/?p=298</guid>
		<description><![CDATA[&#8220;Internet Explorer 6, I hate you. Alas, I must work to correct you.&#8221; &#8211; Craig McRae If you need to use a 24 bit PNG in IE6 and want it to work, you&#8217;re going to need a little help. First, start by creating a new stylesheet just for IE6, call it &#8216;f**kYouIE6.css&#8217; or whatever you&#8217;d [...]]]></description>
			<content:encoded><![CDATA[<p><em>&#8220;Internet Explorer 6, I hate you. Alas, I must work to correct you.&#8221;</em> &#8211; Craig McRae</p>
<p>If you need to use a 24 bit PNG in IE6 and want it to work, you&#8217;re going to need a little help. First, start by creating a new stylesheet just for IE6, call it &#8216;f**kYouIE6.css&#8217; or whatever you&#8217;d like. Then call the css with the following code <strong>after</strong> all of your other CSS calls.</p>
<p><code>&lt;!--[if lt IE 7]&gt;<br />
&lt;link rel="stylesheet" type="text/css" href="css/ie6Blows.css"&gt;<br />
&lt;![endif]--&gt;</code></p>
<p>Then, in your CSS file, add the following property to whatever class/id/object will be using the alpha layer transparency.</p>
<p><code>img {<br />
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader("images/button.png");<br />
}</code></p>
<p><small>please keep in mind, that if you&#8217;re making a website for anybody other than yourself, the aforementioned naming conventions for css files is <strong>strongly</strong> discouraged.</small></p>
]]></content:encoded>
			<wfw:commentRss>http://killthemessenger.net/blog/2010/05/05/alpha-transparency-for-pngs-in-ie6/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>encodeURIComponent (PHP Motion)</title>
		<link>http://killthemessenger.net/blog/2010/02/17/encodeuricomponent-php-motion/</link>
		<comments>http://killthemessenger.net/blog/2010/02/17/encodeuricomponent-php-motion/#comments</comments>
		<pubDate>Wed, 17 Feb 2010 15:46:24 +0000</pubDate>
		<dc:creator>craig</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[encodeURIComponent]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[key]]></category>
		<category><![CDATA[pair]]></category>
		<category><![CDATA[phpmotion]]></category>
		<category><![CDATA[value]]></category>

		<guid isPermaLink="false">http://killthemessenger.net/blog/?p=281</guid>
		<description><![CDATA[I was having some trouble with comments in phpmotion. Turns out the genius developers over there don&#8217;t understand that not all users of the internet forget how to punctuate. After burrowing deep into the code, I found where the key value pair was being created for the POST. At this point all I needed to [...]]]></description>
			<content:encoded><![CDATA[<p>I was having some trouble with comments in phpmotion. Turns out the genius developers over there don&#8217;t understand that not all users of the internet forget how to punctuate. After burrowing deep into the code, I found where the key value pair was being created for the POST. At this point all I needed to do was convert the special characters in the string.</p>
<p><code>204. url += chiave + "=" + encodeURIComponent(valore) + "&amp;"; <span style="color: #008000;">//encodeURIComponent removes special characters that may break the key/value pair.</span></code></p>
<p>If you enter an apostrophe, it thinks the string has ended. If you enter an ampersand it thinks you&#8217;re joining a new key/value pair. So we just encode those (and all) values that would otherwise break the code.  Pretty simple solution to an annoying problem.</p>
<p>Further documentation: <a href="http://www.w3schools.com/jsref/jsref_encodeURIComponent.asp" target="_blank">W3Schools &#8211; encodeURIComponent</a></p>
]]></content:encoded>
			<wfw:commentRss>http://killthemessenger.net/blog/2010/02/17/encodeuricomponent-php-motion/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Forms in IE vs FF (and the rest)</title>
		<link>http://killthemessenger.net/blog/2010/02/14/forms-in-ie-vs-ff-and-the-rest/</link>
		<comments>http://killthemessenger.net/blog/2010/02/14/forms-in-ie-vs-ff-and-the-rest/#comments</comments>
		<pubDate>Sun, 14 Feb 2010 20:11:16 +0000</pubDate>
		<dc:creator>craig</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[browser]]></category>
		<category><![CDATA[compatability]]></category>
		<category><![CDATA[default]]></category>
		<category><![CDATA[explorer]]></category>
		<category><![CDATA[form]]></category>
		<category><![CDATA[internet]]></category>
		<category><![CDATA[prevent]]></category>
		<category><![CDATA[submission]]></category>
		<category><![CDATA[submit]]></category>
		<category><![CDATA[validation]]></category>

		<guid isPermaLink="false">http://killthemessenger.net/blog/?p=266</guid>
		<description><![CDATA[If you&#8217;re trying to prevent the default action of a form to do some JavaScript validation, or for whatever reason, you may have to make some adjustments for Internet Explorer. The key here is capturing the event and telling it what you want, and not letting the browsers default actions take over. The button on [...]]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;re trying to prevent the default action of a form to do some JavaScript validation, or for whatever reason, you may have to make some adjustments for Internet Explorer. The key here is capturing the event and telling it what you want, and not letting the browsers default actions take over.</p>
<p>The button on your form should look something like this:</p>
<p><code>&lt;button id="submit" onclick="validate(event); <span style="color: #ff0000;">return false;</span>"&gt;Send Email&lt;/button&gt;</code> the return false prevents the default action here</p>
<p>The validation code might go something like this:</p>
<p><code>function foo(evt){</code></p>
<p><code>evt = evt || window.event;</code></p>
<p><code>var theform = document.contactForm; <span style="color: #008000;">//this is how I capture my form, by using the form's name</span></code></p>
<p><code><span style="color: #008000;">/* validation code can go here */</span></code></p>
<p><code>if (isvalid){ <span style="color: #008000;">//a test i'm using based on validation requirements</span></code></p>
<p><code>theform.submit();<span style="color: #008000;"> //will submit the form</span><br />
}</code></p>
<p><code><span style="color: #008000;">//the following test will cancel bubbling and default actions across the form, we use this for IE.</span><br />
if (evt.stopPropagation)</p>
<p>evt.stopPropagation();</p>
<p>else</p>
<p></code></p>
<p><code>evt.cancelBubble = true;<br />
</code></p>
<p><code>}</code></p>
<p>Essentially what you&#8217;re doing is stopping the browsers natural reaction to an event, such as clicking the submit button on the form and letting it run through your validation code. The added lines at the bottom prevent certain browsers from continuing on with the default actions even though you&#8217;ve coded <code>return false;</code> in your button click. Thanks Internet Explorer.</p>
<p><small>This is some knowledge dropped on me by my good friend Lawrence. Check <a title="Lawrence O'Sullivan's Website" href="http://lawrence.ecorp.net" target="_blank">his site</a> out for some other useful tips.</small></p>
]]></content:encoded>
			<wfw:commentRss>http://killthemessenger.net/blog/2010/02/14/forms-in-ie-vs-ff-and-the-rest/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

