<?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>Office-it.orG &#187; Javascript</title>
	<atom:link href="http://www.office-it.org/category/web-application/javascript/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.office-it.org</link>
	<description>All about Web and Desktop Application</description>
	<lastBuildDate>Tue, 20 Jul 2010 23:38:52 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=abc</generator>
		<item>
		<title>How to Prevent Spam Bots From Collecting Email Addresses</title>
		<link>http://www.office-it.org/how-to-prevent-spam-bots-from-collecting-email-addresses/</link>
		<comments>http://www.office-it.org/how-to-prevent-spam-bots-from-collecting-email-addresses/#comments</comments>
		<pubDate>Mon, 23 Jun 2008 08:11:11 +0000</pubDate>
		<dc:creator>Hii Hiong Ching</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Web Tools]]></category>
		<category><![CDATA[email]]></category>
		<category><![CDATA[encode]]></category>
		<category><![CDATA[spam]]></category>

		<guid isPermaLink="false">http://www.office-it.org/?p=180</guid>
		<description><![CDATA[As I mentioned before in How to Include Subject, CC, BCC, and Email Body in Email Links, you are creating a risk to get spam if you simply placing email addresses on a page without encoding them. Some websites using &#8220;[at]&#8221; to replace &#8220;@&#8221; and email will look as &#8220;name [at] domain.com&#8221;. This is a [...]]]></description>
			<content:encoded><![CDATA[<p>As I mentioned before in <a href="http://www.office-it.org/how-to-include-subject-cc-bcc-and-email-body-in-email-links/">How to Include Subject, CC, BCC, and Email Body in Email Links</a>, you are creating a risk to get spam if you simply placing email addresses on a page without encoding them.</p>
<p>Some websites using &#8220;[at]&#8221; to replace &#8220;@&#8221; and email will look as &#8220;name [at] domain.com&#8221;. This is a good idea for personal websites since nobody challenge you. In commercial, many clients wouldn&#8217;t allow you to use &#8220;name [at] domain.com&#8221; this format. They are not web designer and they don&#8217;t understand how spam prevention works, or even care for that matter.</p>
<p>I have this method originally from <a href="http://davidwalsh.name/">david walsh blog</a>. Its author have a quick PHP script that you can use when putting raw email addresses on a page:</p>
<p><span id="more-180"></span>The Function</p>
<pre lang="text">
function encode_email($e)
{
	for ($i = 0; $i < strlen($e); $i++) { $output .= '&#'.ord($e[$i]).';'; }
	return $output;
}
</pre>
<p>Usage</p>
<pre lang="text">
echo(encode_email('email@office-it.org'));
</pre>
<p>The above function takes a string input (the email address), loops through each character replacing the letter with the character’s ASCII value, and returns the encoded email address. That’s all you need to do!</p>
<p>Another method (much simple) is found at <a href="http://www.solmetra.lt/scripts/mailto/">SOLMETRA</a>. It is a tiny JavaScript code which will encode email for you.</p>
<p><a href='http://www.solmetra.lt/scripts/mailto/'><img src="http://www.office-it.org/wp-content/uploads/2008/06/mailto-encoder.gif" alt="" title="mailto-encoder" width="480" height="278" class="alignnone size-full wp-image-181" /></a></p>
<p>The disadvantage for second method is if you have a page with hundreds of addresses, the page download will be bloated.</p>
<p>I am not guarantee methods above is bulletproof solution, but it is, at least, a basic protection.</p>
<img src="http://www.office-it.org/?ak_action=api_record_view&id=180&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.office-it.org/how-to-prevent-spam-bots-from-collecting-email-addresses/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>New-Window Links in a Standards-Compliant World</title>
		<link>http://www.office-it.org/new-window-links-in-a-standards-compliant-world/</link>
		<comments>http://www.office-it.org/new-window-links-in-a-standards-compliant-world/#comments</comments>
		<pubDate>Fri, 01 Feb 2008 02:43:55 +0000</pubDate>
		<dc:creator>Hii Hiong Ching</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Standards-Compliant]]></category>
		<category><![CDATA[w3c]]></category>

		<guid isPermaLink="false">http://office-it.org/?p=49</guid>
		<description><![CDATA[Much to the chagrin of Web designers everywhere, the HTML 4.0 Strict and XHTML 1.0 Strict recommendations of the W3C no longer include the target attribute of the tag. The Transitional versions of the specifications still include it, but by definition, these specs are on the way out. Whatever your personal feelings on the practice, [...]]]></description>
			<content:encoded><![CDATA[<p>Much to the chagrin of Web designers everywhere, the HTML 4.0 Strict and XHTML 1.0 Strict recommendations of the W3C no longer include the target attribute of the <a> tag. The Transitional versions of the specifications still include it, but by definition, these specs are on the way out.</p>
<p>Whatever your personal feelings on the practice, the most common application for this attribute &#8212; opening a link in a new browser window with target=&#8221;_blank&#8221; &#8212; is still useful on today&#8217;s Internet. So if the standards say we shouldn&#8217;t use it, how should we go about creating new-window links, while following the latest Web standards?</p>
<p>You can read the original articles from here: <a href="http://www.sitepoint.com/article/standards-compliant-world/">http://www.sitepoint.com/article/standards-compliant-world/</a></p>
<p><strong>The Complete Script</strong></p>
<p>Here is the complete script. Notice the last line, which assigns the externalLinks function to the window&#8217;s onload event handler. This triggers the function when the document has finished loading.</p>
<p><span id="more-49"></span>
<pre lang="javascript">
function externalLinks() {
 if (!document.getElementsByTagName) return;
 var anchors = document.getElementsByTagName("a");
 for (var i=0; i<anchors.length; i++) {
   var anchor = anchors[i];
   if (anchor.getAttribute("href") &#038;&#038;
       anchor.getAttribute("rel") == "external")
     anchor.target = "_blank";
 }
}
window.onload = externalLinks;
</pre>
<p>As this is the kind of script you'll want to deploy across your entire site, you should copy this code into a separate file (e.g. external.js), and then load it in every page on your site with the following code, which should appear in the <head> tag of each document:</p>
<pre lang="html4strict">
<script type="text/javascript" src="/external.js"></script>
</pre>
<p>For these links, we set the rel attribute to external.</p>
<p><strong>Before:</strong></p>
<pre lang="html4strict">
<a href="document.html" target="_blank">external link</a>
</pre>
<p><strong>After:</strong></p>
<pre lang="html4strict">
<a href="document.html" rel="external">external link</a>
</pre>
<p>So, now that we have our new-window links marked up in a standards-compliant way and javascript will cause them to actually open in a new window.</p>
<img src="http://www.office-it.org/?ak_action=api_record_view&id=49&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.office-it.org/new-window-links-in-a-standards-compliant-world/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Still wondering which javascript library to use?</title>
		<link>http://www.office-it.org/still-wondering-which-javascript-library-to-use/</link>
		<comments>http://www.office-it.org/still-wondering-which-javascript-library-to-use/#comments</comments>
		<pubDate>Sun, 23 Dec 2007 09:08:12 +0000</pubDate>
		<dc:creator>Hii Hiong Ching</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[JQuery]]></category>
		<category><![CDATA[library]]></category>
		<category><![CDATA[MooTools]]></category>
		<category><![CDATA[Prototype]]></category>

		<guid isPermaLink="false">http://office-it.org/news/?p=1</guid>
		<description><![CDATA[If you are still wondering which javascript library (Prototype, MooTools, JQuery) to use, you can run the speed/validity selectors test for frameworks from Slickspeed. http://mootools.net/slickspeed/ Every framework runs in its own iFrame, thus no conflicts can happen. Tests are run selector by selector, with an interval to prevent the browser from freeezing. Tests are run [...]]]></description>
			<content:encoded><![CDATA[<p>If you are still wondering which javascript library (Prototype, MooTools, JQuery) to use, you can run the speed/validity selectors test for frameworks from Slickspeed.<br />
<a href="http://mootools.net/slickspeed/"><br />
<img src="http://mootools.net/slickspeed/logo.png" alt="Slickspeed" style="border: medium none " /></a></p>
<p><a href="http://mootools.net/slickspeed/">http://mootools.net/slickspeed/</a></p>
<p>Every framework runs in its own iFrame, thus no conflicts can happen. Tests are run selector by selector, with an interval to prevent the browser from freeezing.</p>
<p>Tests are run in a neutral environment, no library or framework is included in the main javascript test, to avoid favoritism.</p>
<img src="http://www.office-it.org/?ak_action=api_record_view&id=1&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.office-it.org/still-wondering-which-javascript-library-to-use/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

