<?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>... coding (the life) &#187; javascript</title>
	<atom:link href="http://www.marvinmarcelo.com/tag/javascript/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.marvinmarcelo.com</link>
	<description>Anything about programming, and a little about me.</description>
	<lastBuildDate>Mon, 09 Jan 2012 13:44:35 +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>Javascript Encryption</title>
		<link>http://www.marvinmarcelo.com/javascript-encryption/</link>
		<comments>http://www.marvinmarcelo.com/javascript-encryption/#comments</comments>
		<pubDate>Sun, 09 Aug 2009 01:13:39 +0000</pubDate>
		<dc:creator>Marvin</dc:creator>
				<category><![CDATA[me stuff]]></category>
		<category><![CDATA[productivity]]></category>
		<category><![CDATA[work related]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[security]]></category>

		<guid isPermaLink="false">http://www.marvinmarcelo.com/?p=1185</guid>
		<description><![CDATA[jCryption, is simply Javascript Encryption. &#8220;j&#8221; stands for jQuery as core framework. And as always, everybody likes jQuery. Normally if you submit a form and you don&#8217;t use SSL, your data will be sent in plain text. But SSL is &#8230; <a href="http://www.marvinmarcelo.com/javascript-encryption/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.jcryption.org/">jCryption</a>, is simply Javascript Encryption. &#8220;j&#8221; stands for jQuery as core framework. And as always, everybody likes <a href="http://jquery.com">jQuery</a>.</p>
<blockquote><p>Normally if you submit a form and you don&#8217;t use SSL, your data will be sent in plain text.<br />
But SSL is neither supported by every webhost nor it&#8217;s easy to install/apply sometimes.<br />
So I created this plug-in in order that you are able to encrypt your data fast and simple.<br />
jCryption uses the<strong> public-key algorithm of RSA </strong>for the encryption.</p></blockquote>
<p><a href="http://www.jcryption.org/about/">Author&#8217;s site</a> had a good documentation on usage.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.marvinmarcelo.com/javascript-encryption/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to change Google custom search watermark</title>
		<link>http://www.marvinmarcelo.com/how-to-change-google-custom-search-watermark/</link>
		<comments>http://www.marvinmarcelo.com/how-to-change-google-custom-search-watermark/#comments</comments>
		<pubDate>Mon, 08 Dec 2008 15:27:19 +0000</pubDate>
		<dc:creator>Marvin</dc:creator>
				<category><![CDATA[work related]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[javascript]]></category>

		<guid isPermaLink="false">http://www.marvinmarcelo.com/?p=608</guid>
		<description><![CDATA[Google custom search has been around for some time now, but its only now that I look and use it. However, I wanted it to fit on the top search box on my current WP theme. The query box has &#8230; <a href="http://www.marvinmarcelo.com/how-to-change-google-custom-search-watermark/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Google custom search has been around for some time now, but its only now that I look and use it.</p>
<p>However, I wanted it to fit on the top search box on my current <abbr title="WordPress">WP</abbr> theme. The query box has this <a href="http://www.marvinmarcelo.com/wp-content/themes/firebug/images/sbox-copy.png">background</a>, so I looked at the CSS of the entire page. But nothing defines that google logo anywhere. Then, I found this code above embeded using javascript information on Web Developer toolbar. What I did is copy and modified the location of background image I want to use (<code>q.style.background = 'url(your_new_path_to/watermark.gif)';</code>) then, paste in the footer of my current theme. Barabimbaraboom! It executes last with a different background image location or new color background, that&#8217;s it.</p>
<p>But I reverted everything back to default! LOL, as I might violate Google T&amp;C. Or if I found time to read the entire Google&#8217;s T&amp;C on Custom Search, I will update this post, wether or not its ok to remove or change that watermark. <img src='http://www.marvinmarcelo.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
    <span style="color: #003366; font-weight: bold;">var</span> f <span style="color: #339933;">=</span> document.<span style="color: #660066;">getElementById</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'cse-search-box'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span>f<span style="color: #009900;">&#41;</span>
    <span style="color: #009900;">&#123;</span>
      f <span style="color: #339933;">=</span> document.<span style="color: #660066;">getElementById</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'searchbox_demo'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
    <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>f <span style="color: #339933;">&amp;&amp;</span> f.<span style="color: #660066;">q</span><span style="color: #009900;">&#41;</span>
    <span style="color: #009900;">&#123;</span>
      <span style="color: #003366; font-weight: bold;">var</span> q <span style="color: #339933;">=</span> f.<span style="color: #660066;">q</span><span style="color: #339933;">;</span>
      <span style="color: #003366; font-weight: bold;">var</span> n <span style="color: #339933;">=</span> navigator<span style="color: #339933;">;</span>
      <span style="color: #003366; font-weight: bold;">var</span> l <span style="color: #339933;">=</span> location<span style="color: #339933;">;</span>
      <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>n.<span style="color: #660066;">platform</span> <span style="color: #339933;">==</span> <span style="color: #3366CC;">'Win32'</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        q.<span style="color: #660066;">style</span>.<span style="color: #660066;">cssText</span> <span style="color: #339933;">=</span> <span style="color: #3366CC;">'border: 1px solid #7e9db9; padding: 2px;'</span><span style="color: #339933;">;</span>
      <span style="color: #009900;">&#125;</span>
      <span style="color: #003366; font-weight: bold;">var</span> b <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
      <span style="color: #009900;">&#123;</span>
        <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>q.<span style="color: #660066;">value</span> <span style="color: #339933;">==</span> <span style="color: #3366CC;">''</span><span style="color: #009900;">&#41;</span>
        <span style="color: #009900;">&#123;</span>
          <span style="color: #006600; font-style: italic;">/*
            change the path to your intended background image or color.
           */</span>
          q.<span style="color: #660066;">style</span>.<span style="color: #660066;">background</span> <span style="color: #339933;">=</span> <span style="color: #3366CC;">'url(your_new_path_to/watermark.gif)'</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span>
      <span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
      <span style="color: #003366; font-weight: bold;">var</span> f <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #006600; font-style: italic;">/*
           This part is when query box is in focus
         */</span>
        q.<span style="color: #660066;">style</span>.<span style="color: #660066;">background</span> <span style="color: #339933;">=</span> <span style="color: #3366CC;">'#ffffff'</span><span style="color: #339933;">;</span>
      <span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
      q.<span style="color: #000066;">onfocus</span> <span style="color: #339933;">=</span> f<span style="color: #339933;">;</span>
      q.<span style="color: #000066;">onblur</span> <span style="color: #339933;">=</span> b<span style="color: #339933;">;</span>
      <span style="color: #009966; font-style: italic;">/* JS regex that calls blur function when query is not submitted */</span>
      <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">!/</span><span style="color: #009900;">&#91;</span><span style="color: #339933;">&amp;?</span><span style="color: #009900;">&#93;</span>q<span style="color: #339933;">=</span><span style="color: #009900;">&#91;</span><span style="color: #339933;">^&amp;</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">/</span>.<span style="color: #660066;">test</span><span style="color: #009900;">&#40;</span>l.<span style="color: #660066;">search</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
      <span style="color: #009900;">&#123;</span>
        b<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
      <span style="color: #009900;">&#125;</span>
    <span style="color: #009900;">&#125;</span>
  <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.marvinmarcelo.com/how-to-change-google-custom-search-watermark/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

