<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>techtamasha.com</title>
	
	<link>http://www.techtamasha.com</link>
	<description>a new play everyday</description>
	<lastBuildDate>Mon, 13 Jul 2009 09:23:27 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/Techtamasha" /><feedburner:info uri="techtamasha" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><feedburner:emailServiceId>Techtamasha</feedburner:emailServiceId><feedburner:feedburnerHostname>http://feedburner.google.com</feedburner:feedburnerHostname><item>
		<title>How to remove Active Desktop Recovery screen</title>
		<link>http://feedproxy.google.com/~r/Techtamasha/~3/MGX5UNRCTK8/109</link>
		<comments>http://www.techtamasha.com/how-to-remove-active-desktop-recovery-screen/109#comments</comments>
		<pubDate>Mon, 13 Jul 2009 09:23:27 +0000</pubDate>
		<dc:creator>Nischal Shetty</dc:creator>
				<category><![CDATA[Windows]]></category>
		<category><![CDATA[remove active desktop recovery]]></category>
		<category><![CDATA[windows how to]]></category>

		<guid isPermaLink="false">http://www.techtamasha.com/?p=109</guid>
		<description><![CDATA[
Go to Run and type regedit
Now navigate to this path &#8211; HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Desktop\SafeMode\Components
You would find a key named DeskHtmlVersion
Right click the key and select Modify
Under the label Base, select the radio button Decimal
Change Value data to 0
Click OK

This should do the trick. If the screen doesn&#8217;t go then try restarting your PC for the changes [...]]]></description>
			<content:encoded><![CDATA[<ol>
<li>Go to Run and type regedit</li>
<li>Now navigate to this path &#8211; <em>HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Desktop\SafeMode\Components</em></li>
<li>You would find a key named <strong>DeskHtmlVersion</strong></li>
<li>Right click the key and select <strong>Modify</strong></li>
<li>Under the label <strong>Base</strong>, select the radio button <strong>Decimal</strong></li>
<li>Change <strong>Value data</strong> to 0</li>
<li>Click <strong>OK</strong></li>
</ol>
<p>This should do the trick. If the screen doesn&#8217;t go then try restarting your PC for the changes to take effect.</p>

<p><a href="http://feedads.g.doubleclick.net/~a/87s75wchjvbUOIyevJbz2ed2hJw/0/da"><img src="http://feedads.g.doubleclick.net/~a/87s75wchjvbUOIyevJbz2ed2hJw/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/87s75wchjvbUOIyevJbz2ed2hJw/1/da"><img src="http://feedads.g.doubleclick.net/~a/87s75wchjvbUOIyevJbz2ed2hJw/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/Techtamasha?a=MGX5UNRCTK8:5tfw7lsDkOI:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/Techtamasha?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Techtamasha?a=MGX5UNRCTK8:5tfw7lsDkOI:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/Techtamasha?i=MGX5UNRCTK8:5tfw7lsDkOI:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Techtamasha?a=MGX5UNRCTK8:5tfw7lsDkOI:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/Techtamasha?i=MGX5UNRCTK8:5tfw7lsDkOI:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Techtamasha?a=MGX5UNRCTK8:5tfw7lsDkOI:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/Techtamasha?i=MGX5UNRCTK8:5tfw7lsDkOI:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/Techtamasha/~4/MGX5UNRCTK8" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.techtamasha.com/how-to-remove-active-desktop-recovery-screen/109/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://www.techtamasha.com/how-to-remove-active-desktop-recovery-screen/109</feedburner:origLink></item>
		<item>
		<title>javac bug – no unique maximal instance</title>
		<link>http://feedproxy.google.com/~r/Techtamasha/~3/rBlzLtE1tsg/97</link>
		<comments>http://www.techtamasha.com/javac-bug-no-unique-maximal-instance/97#comments</comments>
		<pubDate>Tue, 28 Apr 2009 12:08:13 +0000</pubDate>
		<dc:creator>Nischal Shetty</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[javac bug]]></category>
		<category><![CDATA[no unique maximal instance]]></category>

		<guid isPermaLink="false">http://www.techtamasha.com/?p=97</guid>
		<description><![CDATA[While trying to compile my java class files with the 1.6 java compiler, I came across an error message that read :
&#8220;no unique maximal instance exists for type variable U with upper bounds U&#8221;
The weird thing was that the file compiled just fine in eclipse!
On further probing I realized it&#8217;s a javac bug (check the [...]]]></description>
			<content:encoded><![CDATA[<p>While trying to compile my java class files with the 1.6 java compiler, I came across an error message that read :</p>
<p>&#8220;<strong>no unique maximal instance exists for type variable U with upper bounds U</strong>&#8221;</p>
<p>The weird thing was that the file compiled just fine in eclipse!</p>
<p>On further probing I realized it&#8217;s a javac bug (<a href="http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6302954">check the bug here</a>)</p>
<p>Here&#8217;s the workaround -</p>
<p><span style="text-decoration: underline;">Bug Scenario</span> :</p>
<p>public class SomeObject {</p>
<p>&lt;U extends SomeObject&gt; U foo1() throws Exception {</p>
<p>SomeObject obj = new SomeObject();<br />
return obj.foo1();<br />
}</p>
<p>}</p>
<p><span style="text-decoration: underline;">Solve this way </span>:</p>
<p>public class SomeObject {</p>
<p>&lt;U extends SomeObject&gt; U foo1() throws Exception {</p>
<p>SomeObject obj = new SomeObject();<br />
return obj.<strong>&lt;U&gt;</strong>foo1();<br />
}<br />
}</p>

<p><a href="http://feedads.g.doubleclick.net/~a/h1tYZYB3Tm-hVPq2RaHM2XmqTM8/0/da"><img src="http://feedads.g.doubleclick.net/~a/h1tYZYB3Tm-hVPq2RaHM2XmqTM8/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/h1tYZYB3Tm-hVPq2RaHM2XmqTM8/1/da"><img src="http://feedads.g.doubleclick.net/~a/h1tYZYB3Tm-hVPq2RaHM2XmqTM8/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/Techtamasha?a=rBlzLtE1tsg:yyN6yhANkE4:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/Techtamasha?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Techtamasha?a=rBlzLtE1tsg:yyN6yhANkE4:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/Techtamasha?i=rBlzLtE1tsg:yyN6yhANkE4:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Techtamasha?a=rBlzLtE1tsg:yyN6yhANkE4:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/Techtamasha?i=rBlzLtE1tsg:yyN6yhANkE4:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Techtamasha?a=rBlzLtE1tsg:yyN6yhANkE4:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/Techtamasha?i=rBlzLtE1tsg:yyN6yhANkE4:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/Techtamasha/~4/rBlzLtE1tsg" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.techtamasha.com/javac-bug-no-unique-maximal-instance/97/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.techtamasha.com/javac-bug-no-unique-maximal-instance/97</feedburner:origLink></item>
		<item>
		<title>Javascript Substring function</title>
		<link>http://feedproxy.google.com/~r/Techtamasha/~3/KHUKDAYUvfk/76</link>
		<comments>http://www.techtamasha.com/javascript-substring-function/76#comments</comments>
		<pubDate>Mon, 29 Dec 2008 17:43:45 +0000</pubDate>
		<dc:creator>Nischal Shetty</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[extract string javascript]]></category>
		<category><![CDATA[javascript substring]]></category>
		<category><![CDATA[js]]></category>
		<category><![CDATA[substring]]></category>
		<category><![CDATA[substring javascript]]></category>

		<guid isPermaLink="false">http://techtamasha.com/?p=76</guid>
		<description><![CDATA[Javascript has an inbuilt substring function which helps to extract parts of a string.
substring(start, stop) :
start (mandatory) &#8211; The starting index
stop (optional) &#8211; The index to stop extraction
Example: If you want to find the first 3 alphabets in the word INDIA, the code would be
var name = &#8220;INDIA&#8221;;
var firstThreeLetters = name.substring(0,3);
alert(firstThreeLetters);
The alert would display : [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Javascript</strong> has an inbuilt <strong>substring</strong> function which helps to extract parts of a string.</p>
<p>substring(start, stop) :</p>
<p><strong>start</strong> (<em>mandatory</em>) &#8211; The starting index</p>
<p><strong>stop</strong> (<em>optional</em>) &#8211; The index to stop extraction</p>
<p><span style="text-decoration: underline;">Example</span>: If you want to find the first 3 alphabets in the word <span style="color: #008000;">INDIA</span>, the code would be</p>
<blockquote><p>var name = &#8220;INDIA&#8221;;</p>
<p>var firstThreeLetters = name.substring(0,3);</p>
<p>alert(firstThreeLetters);</p></blockquote>
<p>The alert would display : <span style="color: #008000;">IND</span></p>
<p><span style="text-decoration: underline;">Note</span>: Here <span style="text-decoration: underline;"><em>start</em></span> is 0 hence the extraction starts from the letter in the 0th position i.e. the first letter. The <span style="text-decoration: underline;"><em>stop</em></span> index is 3 which means extraction would stop at index 3 (<span style="text-decoration: underline;">the letter at index 3 will not be extracted</span>)</p>
<p>Since <em><span style="text-decoration: underline;">stop</span></em> is optional, if you only specify the <em><span style="text-decoration: underline;">start</span></em> parameter, all the letters after the starting index (including the one at the start) would be extracted.</p>
<p><span style="text-decoration: underline;">Example</span>: Consider the same example as above, for the word <span style="color: #008000;">INDIA</span> if we were to give the <em><span style="text-decoration: underline;">start</span></em> as 1</p>
<blockquote><p>var name = &#8220;INDIA&#8221;;</p>
<p>var extractedLetters = name.substring(1);</p>
<p>alert(extractedLetters);</p></blockquote>
<p>The alert would display <span style="color: #008000;">NDIA</span> as the output of the javascript substring method.</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;</p>
<h2>Indepth Analysis of Javascript substring</h2>
<p>Let&#8217;s try and create our own Javascript substring function.</p>
<blockquote><p>String.prototype.mySubstring = function(start,stop) {</p>
<p>var charArray = this.split(&#8217;);</p>
<p>var temp = &#8220;&#8221;;</p>
<p>for(var i=start;&lt;stop;i++)</p>
<p>{</p>
<p>temp = temp + charArray[i];</p>
<p>}</p>
<p>return temp;</p>
<p>}</p></blockquote>
<p>Now, you can use this function instead of the default substring function. Include the above code in any page and you can use mySubstring inside any javascript function.</p>
<p><span style="text-decoration: underline;">Example</span>:</p>
<blockquote><p>var name = &#8220;INDIA&#8221;;</p>
<p>var extractedLetters = name.mySubstring(0,3);</p>
<p>alert(extractedLetters);</p></blockquote>
<p>The alert would display IND thus emulating the real Javascript substring function!</p>
<p><span style="text-decoration: underline;">Note</span>: This method is just a food for thought. To help you understand how exactly such methods would be implemented. For all practical purposes use the default substring function of Javascript.</p>

<p><a href="http://feedads.g.doubleclick.net/~a/9CqsGBku19-0RKcs9niDQ4wesj4/0/da"><img src="http://feedads.g.doubleclick.net/~a/9CqsGBku19-0RKcs9niDQ4wesj4/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/9CqsGBku19-0RKcs9niDQ4wesj4/1/da"><img src="http://feedads.g.doubleclick.net/~a/9CqsGBku19-0RKcs9niDQ4wesj4/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/Techtamasha?a=KHUKDAYUvfk:TEXbTGS882c:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/Techtamasha?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Techtamasha?a=KHUKDAYUvfk:TEXbTGS882c:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/Techtamasha?i=KHUKDAYUvfk:TEXbTGS882c:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Techtamasha?a=KHUKDAYUvfk:TEXbTGS882c:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/Techtamasha?i=KHUKDAYUvfk:TEXbTGS882c:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Techtamasha?a=KHUKDAYUvfk:TEXbTGS882c:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/Techtamasha?i=KHUKDAYUvfk:TEXbTGS882c:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/Techtamasha/~4/KHUKDAYUvfk" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.techtamasha.com/javascript-substring-function/76/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.techtamasha.com/javascript-substring-function/76</feedburner:origLink></item>
		<item>
		<title>Create a desktop shortcut to lock computer</title>
		<link>http://feedproxy.google.com/~r/Techtamasha/~3/BO99w8hyDHs/74</link>
		<comments>http://www.techtamasha.com/create-a-desktop-shortcut-to-lock-computer/74#comments</comments>
		<pubDate>Wed, 10 Dec 2008 09:58:39 +0000</pubDate>
		<dc:creator>Nischal Shetty</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[how lock windows shortcut]]></category>
		<category><![CDATA[lock windows]]></category>
		<category><![CDATA[lock windows shortcut]]></category>
		<category><![CDATA[single click lock windows]]></category>
		<category><![CDATA[windows shortcut lock]]></category>

		<guid isPermaLink="false">http://techtamasha.com/?p=74</guid>
		<description><![CDATA[You can lock your windows desktop by clicking on &#8220;windows key + L&#8220;. There is another way to do this. By creating a shortcut.
Right Click on your desktop and select
New -&#62; Shortcut.
A shortcut will be created and a dialog box would pop up.
Copy paste %windir%\system32\rundll32.exe user32.dll,LockWorkStation into the text box of the dialog.
Click Next. Type [...]]]></description>
			<content:encoded><![CDATA[<p>You can lock your windows desktop by clicking on &#8220;<strong>windows key + L</strong>&#8220;. There is another way to do this. By creating a shortcut.</p>
<p>Right Click on your desktop and select</p>
<p><strong>New</strong> -&gt; <strong>Shortcut</strong>.</p>
<p>A shortcut will be created and a dialog box would pop up.</p>
<p>Copy paste <span style="color: #008000;">%windir%\system32\rundll32.exe user32.dll,LockWorkStation</span> into the text box of the dialog.</p>
<p>Click Next. Type any name you like.</p>
<p>A desktop shortcut with the name that you gave would be created. Double click anytime to lock your computer.</p>

<p><a href="http://feedads.g.doubleclick.net/~a/D5OuOlKx56eGhp0gLTftl5VZTZc/0/da"><img src="http://feedads.g.doubleclick.net/~a/D5OuOlKx56eGhp0gLTftl5VZTZc/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/D5OuOlKx56eGhp0gLTftl5VZTZc/1/da"><img src="http://feedads.g.doubleclick.net/~a/D5OuOlKx56eGhp0gLTftl5VZTZc/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/Techtamasha?a=BO99w8hyDHs:tmp4MLkuAJo:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/Techtamasha?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Techtamasha?a=BO99w8hyDHs:tmp4MLkuAJo:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/Techtamasha?i=BO99w8hyDHs:tmp4MLkuAJo:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Techtamasha?a=BO99w8hyDHs:tmp4MLkuAJo:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/Techtamasha?i=BO99w8hyDHs:tmp4MLkuAJo:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Techtamasha?a=BO99w8hyDHs:tmp4MLkuAJo:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/Techtamasha?i=BO99w8hyDHs:tmp4MLkuAJo:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/Techtamasha/~4/BO99w8hyDHs" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.techtamasha.com/create-a-desktop-shortcut-to-lock-computer/74/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.techtamasha.com/create-a-desktop-shortcut-to-lock-computer/74</feedburner:origLink></item>
		<item>
		<title>Generate dynamic id’s for struts html tags</title>
		<link>http://feedproxy.google.com/~r/Techtamasha/~3/lPrrC5YbEgU/72</link>
		<comments>http://www.techtamasha.com/generate-dynamic-ids-for-struts-html-tags/72#comments</comments>
		<pubDate>Tue, 23 Sep 2008 05:18:29 +0000</pubDate>
		<dc:creator>Nischal Shetty</dc:creator>
				<category><![CDATA[Struts]]></category>
		<category><![CDATA[dynamic style id struts tag]]></category>
		<category><![CDATA[generate id using scriptlet struts tag]]></category>
		<category><![CDATA[scriptlets in struts tag]]></category>
		<category><![CDATA[struts html generate dynamic id]]></category>
		<category><![CDATA[struts html tag dynamic style id]]></category>

		<guid isPermaLink="false">http://techtamasha.com/?p=72</guid>
		<description><![CDATA[Do you use struts tags to generate html content? If yes, then sooner or later you&#8217;ll come across a scenario where you would generate html elements with the same name but would need different id&#8217;s for each element. I faced a similar predicament recently. I had no other option but to use scriptlets to generate [...]]]></description>
			<content:encoded><![CDATA[<p>Do you use struts tags to generate html content? If yes, then sooner or later you&#8217;ll come across a scenario where you would generate html elements with the same name but would need different id&#8217;s for each element. I faced a similar predicament recently. I had no other option but to use scriptlets to generate id&#8217;s for the html elements. However, I soon found out using scriptlets within the struts html tags isn&#8217;t really straight forward.</p>
<p>Here&#8217;s the code I tried in my first attempt:</p>
<p><span style="color: #339966;">&lt;%int i=0;%&gt;</span></p>
<p><span style="color: #339966;">//iteration logic here</span></p>
<p><span style="color: #339966;">&lt;html:text property=&#8221;example&#8221; styleid=&#8221;example&lt;%=i%&gt;&#8221;&gt;</span></p>
<p>Well, if you write the code as shown above, the html code generated would be :</p>
<p><span style="color: #339966;">&lt;input type=&#8221;text&#8221; name=&#8221;example&#8221; id = &#8220;example&lt;%=i%&gt;&#8221;&gt;</span></p>
<p>and not</p>
<p><span style="color: #339966;">&lt;input type=&#8221;text&#8221; name=&#8221;example&#8221; id=&#8221;example0&#8243;&gt;</span></p>
<p>To get the expected result, i.e. for the scriptlet to work inside the struts html tag, write as below:</p>
<p><span style="color: #339966;">&lt;html:text property=&#8221;example&#8221; styleid=&#8217;&lt;%=&#8221;example&#8221;+i%&gt;&#8217;</span></p>
<p>That&#8217;s it. If any of you ever find out a way to generate different id&#8217;s for html elements with the same name using strtus tags exclusively then do let me know <img src='http://www.techtamasha.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>

<p><a href="http://feedads.g.doubleclick.net/~a/EjoxGAHLSw9LJ6NKk7TjAKeg1JY/0/da"><img src="http://feedads.g.doubleclick.net/~a/EjoxGAHLSw9LJ6NKk7TjAKeg1JY/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/EjoxGAHLSw9LJ6NKk7TjAKeg1JY/1/da"><img src="http://feedads.g.doubleclick.net/~a/EjoxGAHLSw9LJ6NKk7TjAKeg1JY/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/Techtamasha?a=lPrrC5YbEgU:5PZQTWB3Fl4:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/Techtamasha?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Techtamasha?a=lPrrC5YbEgU:5PZQTWB3Fl4:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/Techtamasha?i=lPrrC5YbEgU:5PZQTWB3Fl4:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Techtamasha?a=lPrrC5YbEgU:5PZQTWB3Fl4:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/Techtamasha?i=lPrrC5YbEgU:5PZQTWB3Fl4:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Techtamasha?a=lPrrC5YbEgU:5PZQTWB3Fl4:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/Techtamasha?i=lPrrC5YbEgU:5PZQTWB3Fl4:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/Techtamasha/~4/lPrrC5YbEgU" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.techtamasha.com/generate-dynamic-ids-for-struts-html-tags/72/feed</wfw:commentRss>
		<slash:comments>5</slash:comments>
		<feedburner:origLink>http://www.techtamasha.com/generate-dynamic-ids-for-struts-html-tags/72</feedburner:origLink></item>
		<item>
		<title>Method overriding and overloading in Java</title>
		<link>http://feedproxy.google.com/~r/Techtamasha/~3/nroM8magsvQ/66</link>
		<comments>http://www.techtamasha.com/method-overriding-and-overloading-in-java/66#comments</comments>
		<pubDate>Fri, 04 Jul 2008 18:38:22 +0000</pubDate>
		<dc:creator>Nischal Shetty</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[method overloading]]></category>
		<category><![CDATA[overriding]]></category>

		<guid isPermaLink="false">http://techtamasha.com/?p=66</guid>
		<description><![CDATA[I know this may be trivial for many people but then it can be pretty confusing for new bees (pssst.. in the beginning me too used to be confused between overloading and overriding)
OVERRIDING &#8211; when you extend a class and write a method in the derived class which is exactly similar to the one present [...]]]></description>
			<content:encoded><![CDATA[<p>I know this may be trivial for many people but then it can be pretty confusing for new bees (pssst.. in the beginning me too used to be confused between overloading and overriding)</p>
<p><strong>OVERRIDING &#8211; when you extend a class and write a method in the derived class which is exactly similar to the one present in the base class, it is termed as overriding.</strong></p>
<blockquote><p><span style="color: #800000;">Example:</span></p>
<p><span style="color: #800000;">public class BaseClass{</span></p>
<p><span style="color: #800000;">public void methodToOverride()</span></p>
<p><span style="color: #800000;">{</span></p>
<p><span style="color: #800000;">//Some code here</span></p>
<p><span style="color: #800000;">}</span></p>
<p><span style="color: #800000;">}</span></p>
<p><span style="color: #800000;">public class DerivedClass extends BaseClass{</span></p>
<p><span style="color: #800000;">public void methodToOverride()</span></p>
<p><span style="color: #800000;">{</span></p>
<p><span style="color: #800000;">//Some new code here</span></p>
<p><span style="color: #800000;">}</span></p>
<p><span style="color: #800000;">}</span></p></blockquote>
<p>As you can see, in the class DerivedClass, we have overridden the method present in the BaseClass with a completely new piece of code in the DerivedClass.</p>
<p>What that effectively means is that if you create an object of DerivedClass and call the methodToOverride() method, the code in the derivedClass will be executed. If you hadn&#8217;t overridden the method in the DerivedClass then the method in the BaseClass would have been called.</p>
<p><strong>OVERLOADING -  when you have more than one method with the same name but different arguments, the methods are said to be overloaded.</strong></p>
<blockquote><p><span style="color: #800000;">Example:</span></p>
<p><span style="color: #800000;">public class OverLoadingExample{</span></p>
<p><span style="color: #800000;">public void add(int i, int j)</span></p>
<p><span style="color: #800000;">{</span></p>
<p><span style="color: #800000;">int k = i + j;</span></p>
<p><span style="color: #800000;">}</span></p>
<p><span style="color: #800000;">public void add(String s, String t)</span></p>
<p><span style="color: #800000;">{</span></p>
<p><span style="color: #800000;">int k = Integer.parseInt(s) + Integer.parseInt(t);</span></p>
<p><span style="color: #800000;">}</span></p>
<p><span style="color: #800000;">}</span></p></blockquote>
<p>As you can see in the example above, we have the same method add() taking two parameters but with different data types. Due to overloading we can now call the add method by either passing it a String or int <img src='http://www.techtamasha.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>

<p><a href="http://feedads.g.doubleclick.net/~a/c6O_UfbsCRY2H3It1WEnRPk2yGI/0/da"><img src="http://feedads.g.doubleclick.net/~a/c6O_UfbsCRY2H3It1WEnRPk2yGI/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/c6O_UfbsCRY2H3It1WEnRPk2yGI/1/da"><img src="http://feedads.g.doubleclick.net/~a/c6O_UfbsCRY2H3It1WEnRPk2yGI/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/Techtamasha?a=nroM8magsvQ:TAzHMWu2FhA:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/Techtamasha?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Techtamasha?a=nroM8magsvQ:TAzHMWu2FhA:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/Techtamasha?i=nroM8magsvQ:TAzHMWu2FhA:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Techtamasha?a=nroM8magsvQ:TAzHMWu2FhA:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/Techtamasha?i=nroM8magsvQ:TAzHMWu2FhA:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Techtamasha?a=nroM8magsvQ:TAzHMWu2FhA:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/Techtamasha?i=nroM8magsvQ:TAzHMWu2FhA:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/Techtamasha/~4/nroM8magsvQ" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.techtamasha.com/method-overriding-and-overloading-in-java/66/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://www.techtamasha.com/method-overriding-and-overloading-in-java/66</feedburner:origLink></item>
		<item>
		<title>Page submits twice when background = “#”</title>
		<link>http://feedproxy.google.com/~r/Techtamasha/~3/Fy51SITxpBA/59</link>
		<comments>http://www.techtamasha.com/page-submits-twice-when-background/59#comments</comments>
		<pubDate>Sat, 07 Jun 2008 19:32:11 +0000</pubDate>
		<dc:creator>Nischal Shetty</dc:creator>
				<category><![CDATA[HTML]]></category>
		<category><![CDATA[background="#"]]></category>
		<category><![CDATA[background="#" submits page twice]]></category>
		<category><![CDATA[Multiple page submission problem]]></category>
		<category><![CDATA[Page submits twice]]></category>

		<guid isPermaLink="false">http://techtamasha.com/?p=59</guid>
		<description><![CDATA[If you ever come across a situation where your page goes to the same action twice for no apparent reason then make sure that there&#8217;s no background=&#8221;#&#8221; anywhere in your page.
I found that if there&#8217;s background=&#8221;#&#8221; then the page tends to submit the same request twice!! Call it a bug in html&#8230; Not sure about [...]]]></description>
			<content:encoded><![CDATA[<p>If you ever come across a situation where your page goes to the same action twice for no apparent reason then make sure that there&#8217;s no background=&#8221;#&#8221; anywhere in your page.</p>
<p>I found that if there&#8217;s background=&#8221;#&#8221; then the page tends to submit the same request twice!! Call it a bug in html&#8230; Not sure about that. But the code is as below:</p>
<blockquote><p><span style="color: #800000;">&lt;table background=&#8221;#&#8221;&gt;</span></p>
<p><span style="color: #800000;">&lt;tr&gt;</span></p>
<p><span style="color: #800000;">&lt;td&gt;</span></p>
<p><span style="color: #800000;">This piece of code in your page will cause the request to be submitted twice!!</span></p>
<p><span style="color: #800000;">&lt;/td&gt;</span></p></blockquote>
<blockquote><p><span style="color: #800000;">&lt;/tr&gt;</span></p>
<p><span style="color: #800000;">&lt;/table&gt;</span></p></blockquote>
<p>Please leave a comment if you have anything to add to this <img src='http://www.techtamasha.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>

<p><a href="http://feedads.g.doubleclick.net/~a/W3__rgjPp8W_2-aWtC3AZxyGeVc/0/da"><img src="http://feedads.g.doubleclick.net/~a/W3__rgjPp8W_2-aWtC3AZxyGeVc/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/W3__rgjPp8W_2-aWtC3AZxyGeVc/1/da"><img src="http://feedads.g.doubleclick.net/~a/W3__rgjPp8W_2-aWtC3AZxyGeVc/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/Techtamasha?a=Fy51SITxpBA:o9Q4Rf7odPg:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/Techtamasha?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Techtamasha?a=Fy51SITxpBA:o9Q4Rf7odPg:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/Techtamasha?i=Fy51SITxpBA:o9Q4Rf7odPg:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Techtamasha?a=Fy51SITxpBA:o9Q4Rf7odPg:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/Techtamasha?i=Fy51SITxpBA:o9Q4Rf7odPg:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Techtamasha?a=Fy51SITxpBA:o9Q4Rf7odPg:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/Techtamasha?i=Fy51SITxpBA:o9Q4Rf7odPg:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/Techtamasha/~4/Fy51SITxpBA" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.techtamasha.com/page-submits-twice-when-background/59/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.techtamasha.com/page-submits-twice-when-background/59</feedburner:origLink></item>
		<item>
		<title>Technical site reviews… What do you think?</title>
		<link>http://feedproxy.google.com/~r/Techtamasha/~3/rB0kWdFBkWI/56</link>
		<comments>http://www.techtamasha.com/technical-site-reviews-what-do-you-think/56#comments</comments>
		<pubDate>Tue, 27 May 2008 04:22:49 +0000</pubDate>
		<dc:creator>Nischal Shetty</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://techtamasha.com/?p=56</guid>
		<description><![CDATA[I am planning to start a blog (review.techtamasha.com) where I review all the other good technical sites, blogs and all kinds of softwares that will help you make your job as a developer or blogger a lot easier. I&#8217;ll keep you posted when I start it and it&#8217;s gonna be soon ;o) 
]]></description>
			<content:encoded><![CDATA[<p>I am planning to start a blog (review.techtamasha.com) where I review all the other good technical sites, blogs and all kinds of softwares that will help you make your job as a developer or blogger a lot easier. I&#8217;ll keep you posted when I start it and it&#8217;s gonna be soon ;o) </p>

<p><a href="http://feedads.g.doubleclick.net/~a/08QFGocf_xv7CyrF_-FQ_2zkMcw/0/da"><img src="http://feedads.g.doubleclick.net/~a/08QFGocf_xv7CyrF_-FQ_2zkMcw/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/08QFGocf_xv7CyrF_-FQ_2zkMcw/1/da"><img src="http://feedads.g.doubleclick.net/~a/08QFGocf_xv7CyrF_-FQ_2zkMcw/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/Techtamasha?a=rB0kWdFBkWI:nqTU5lAXkLs:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/Techtamasha?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Techtamasha?a=rB0kWdFBkWI:nqTU5lAXkLs:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/Techtamasha?i=rB0kWdFBkWI:nqTU5lAXkLs:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Techtamasha?a=rB0kWdFBkWI:nqTU5lAXkLs:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/Techtamasha?i=rB0kWdFBkWI:nqTU5lAXkLs:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Techtamasha?a=rB0kWdFBkWI:nqTU5lAXkLs:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/Techtamasha?i=rB0kWdFBkWI:nqTU5lAXkLs:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/Techtamasha/~4/rB0kWdFBkWI" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.techtamasha.com/technical-site-reviews-what-do-you-think/56/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.techtamasha.com/technical-site-reviews-what-do-you-think/56</feedburner:origLink></item>
		<item>
		<title>Identify the browser used by the client</title>
		<link>http://feedproxy.google.com/~r/Techtamasha/~3/PKlqXVAhkpU/7</link>
		<comments>http://www.techtamasha.com/identify-the-browser-used-by-the-client/7#comments</comments>
		<pubDate>Tue, 06 May 2008 18:22:45 +0000</pubDate>
		<dc:creator>Nischal Shetty</dc:creator>
				<category><![CDATA[Browsers]]></category>
		<category><![CDATA[browser identify]]></category>
		<category><![CDATA[browser javascript]]></category>

		<guid isPermaLink="false">http://techtamasha.com/?p=7</guid>
		<description><![CDATA[You may want to know the details of the browser used by the various visitors to your site. Lets see how the navigator object can be used to identify the browser details of the user. The navigator object has a property named &#8216;appName&#8217; which will do the trick.The code below is all that is needed:
navigator.appName
For [...]]]></description>
			<content:encoded><![CDATA[<p>You may want to know the details of the browser used by the various visitors to your site. Lets see how the <strong>navigator</strong> object can be used to identify the browser details of the user. The navigator object has a property named &#8216;appName&#8217; which will do the trick.The code below is all that is needed:</p>
<p><strong>navigator.appName</strong></p>
<p>For Ex.</p>
<p>function identifyBrowser()</p>
<p>{</p>
<p>alert(&#8221;You seem to be working on the &#8220;+navigator.appName+&#8221; browser&#8221;);</p>
<p>}</p>
<p>The navigator method has a few other properties like:</p>
<p>appCodeName</p>
<p>appVersion</p>
<p>language</p>
<p>mimeTypes[]</p>
<p>platform</p>
<p>plugins[]</p>
<p>userAgent</p>
<p><a title="Click here to view the example" href="http://techtamasha.com/wp-content/uploads/2008/05/identifybrowser.html">Click here to view the example</a></p>

<p><a href="http://feedads.g.doubleclick.net/~a/lylmZrOEQWgBDcCjM19DYGAwyOU/0/da"><img src="http://feedads.g.doubleclick.net/~a/lylmZrOEQWgBDcCjM19DYGAwyOU/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/lylmZrOEQWgBDcCjM19DYGAwyOU/1/da"><img src="http://feedads.g.doubleclick.net/~a/lylmZrOEQWgBDcCjM19DYGAwyOU/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/Techtamasha?a=PKlqXVAhkpU:4AjVCS844Dc:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/Techtamasha?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Techtamasha?a=PKlqXVAhkpU:4AjVCS844Dc:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/Techtamasha?i=PKlqXVAhkpU:4AjVCS844Dc:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Techtamasha?a=PKlqXVAhkpU:4AjVCS844Dc:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/Techtamasha?i=PKlqXVAhkpU:4AjVCS844Dc:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Techtamasha?a=PKlqXVAhkpU:4AjVCS844Dc:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/Techtamasha?i=PKlqXVAhkpU:4AjVCS844Dc:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/Techtamasha/~4/PKlqXVAhkpU" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.techtamasha.com/identify-the-browser-used-by-the-client/7/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://www.techtamasha.com/identify-the-browser-used-by-the-client/7</feedburner:origLink></item>
		<item>
		<title>Javascript email validation</title>
		<link>http://feedproxy.google.com/~r/Techtamasha/~3/-olD66Szx8Y/47</link>
		<comments>http://www.techtamasha.com/javascript-email-validation/47#comments</comments>
		<pubDate>Mon, 05 May 2008 17:46:55 +0000</pubDate>
		<dc:creator>Nischal Shetty</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[email javascript]]></category>
		<category><![CDATA[email validation]]></category>
		<category><![CDATA[javascript email]]></category>
		<category><![CDATA[javascript email validation]]></category>
		<category><![CDATA[javascript regular expression]]></category>
		<category><![CDATA[regular expression]]></category>

		<guid isPermaLink="false">http://techtamasha.com/?p=47</guid>
		<description><![CDATA[This post will describe the javascript email validation.
First and foremost, all apologies for such a long delay in writing a new post. I was kind of tied up with some work. But from now on I&#8217;ll try my best to be regular  
We will be using regular expression for email validation. And don&#8217;t you [...]]]></description>
			<content:encoded><![CDATA[<p>This post will describe the <strong>javascript email validation</strong>.</p>
<p>First and foremost, all apologies for such a long delay in writing a new post. I was kind of tied up with some work. But from now on I&#8217;ll try my best to be regular <img src='http://www.techtamasha.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>We will be using regular expression for email validation. And don&#8217;t you worry. I&#8217;ll see to it that by the time you finish reading this post, you would have got a fair idea about Regular Expressions.</p>
<p>Lets try to construct the regular expression that we will be using to check the email   entered by the user.</p>
<p>Consider these two email id&#8217;s : example@example.com and exam_ple@ex.am.ple</p>
<p><span style="text-decoration: underline;">Quick references</span>:</p>
<p><strong>.</strong> (dot) matches any single character. Ex. &#8220;h.t&#8221; will match &#8220;hut&#8221;, &#8220;hot&#8221; etc.</p>
<p><strong>[ ]</strong> Brackets match a single character that is contained in the given expression. Ex. [a-d] will match &#8216;a&#8217; or &#8216;b&#8217; or &#8216;c&#8217; or &#8216;d&#8217;. Similarly, [a-cx-z] will match &#8216;a&#8217; or &#8216;b&#8217; or &#8216;c&#8217; or &#8216;x&#8217; or &#8216;y&#8217; or &#8216;z&#8217;.</p>
<p><strong>^</strong> Matches the starting position within the given string.</p>
<p><strong>$</strong> Matches the ending position of the given string.</p>
<p><strong>*</strong> Matches the <strong>preceding </strong>element zero or more times.</p>
<p><strong>+ </strong>Matches the <strong>preceding </strong>element one or more times.</p>
<p><strong>{n,m} </strong>Matches the occurrence of the previous symbol not less than <strong>n </strong>and not more than <strong>m </strong>times.</p>
<p><strong>\</strong> Its the escape character.  Ex. As shown above, .(dot) matches a single occurrence of any character. But what if we need to match an occurrence of (dot) itself. We write it as \.</p>
<p><span style="text-decoration: underline;">Considering the email id&#8217;s shown above, we can list our requirements as follows</span>:</p>
<p>1. Email Id needs to start with alphabets or numbers &#8211; regex will be  ^([a-zA-Z0-9])  i.e.  the email id should start with either an alphabet or a number.</p>
<p>2. It can contain any number of alphabets, numbers and a few special characters. RegEx will be  ([a-zA-Z0-9\.\_\-])*</p>
<p>3.  Then there should be the famous &#8216;@&#8217; symbol which we simply write as  @</p>
<p>4.  Then again any number of alphabets or numbers or &#8216;-&#8217; are allowed. RegEx is (([a-zA-Z0-9\-])+\.)+</p>
<p>5. Finally, the ending of the email  ([a-zA-Z]{2,4})+$</p>
<p><span style="text-decoration: underline;">Here&#8217;s the final regular expression for validating the email id&#8217;s</span> :</p>
<p>^([a-zA-Z0-9])([a-zA-Z0-9\.\_\-])*@(([a-zA-Z0-9])+(\.))+([a-zA-Z]{2,4})+$</p>
<p>Now, lets see how to use it in the javascript. We make use of the search() function of javascript.</p>
<p>function emailValidation(){</p>
<p>var emailRegEx = /^([a-zA-Z0-9])([a-zA-Z0-9\._-])*@(([a-zA-Z0-9])+(\.))+([a-zA-Z]{2,4})+$/ ;</p>
<p>var testMail = &#8220;example@example.com&#8221;;</p>
<p>if(testMail.search(emailRegEx)==-1)</p>
<p>alert(&#8221;Invalid&#8221;);</p>
<p>}</p>
<h3><a href="http://techtamasha.com/examples/emailValidation.html" target="_blank">Click Here to view the example</a>.</h3>
<p><strong>UPDATE 1 :</strong> Please use the regular expression shown below instead of the one above. This fixes the bug which allowed consecutive special charaters i.e. previously <strong>example..example@example.com</strong> was displayed as valid. It has been fixed now. Please do test the script before you plan to use it. If you find some problems in it then do let me know. I&#8217;ll try and fix it.</p>
<p><span style="font-family: Arial; color: black; font-size: x-small;"><span style="font-size: 10pt; color: #000000;"><span style="color: #ff0000;">var emailRegEx =  /^([a-zA-Z0-9])(([a-zA-Z0-9])*([\._-])?([a-zA-Z0-9]))*@(([a-zA-Z0-9\-])+(\.))+([a-zA-Z]{2,4})+$/ </span></span></span></p>

<p><a href="http://feedads.g.doubleclick.net/~a/BBltyGp13VLuWDZ74IPJGbrMxPk/0/da"><img src="http://feedads.g.doubleclick.net/~a/BBltyGp13VLuWDZ74IPJGbrMxPk/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/BBltyGp13VLuWDZ74IPJGbrMxPk/1/da"><img src="http://feedads.g.doubleclick.net/~a/BBltyGp13VLuWDZ74IPJGbrMxPk/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/Techtamasha?a=-olD66Szx8Y:k4CCdLNztiE:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/Techtamasha?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Techtamasha?a=-olD66Szx8Y:k4CCdLNztiE:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/Techtamasha?i=-olD66Szx8Y:k4CCdLNztiE:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Techtamasha?a=-olD66Szx8Y:k4CCdLNztiE:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/Techtamasha?i=-olD66Szx8Y:k4CCdLNztiE:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Techtamasha?a=-olD66Szx8Y:k4CCdLNztiE:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/Techtamasha?i=-olD66Szx8Y:k4CCdLNztiE:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/Techtamasha/~4/-olD66Szx8Y" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.techtamasha.com/javascript-email-validation/47/feed</wfw:commentRss>
		<slash:comments>11</slash:comments>
		<feedburner:origLink>http://www.techtamasha.com/javascript-email-validation/47</feedburner:origLink></item>
	</channel>
</rss><!-- Dynamic page generated in 0.385 seconds. --><!-- Cached page generated by WP-Super-Cache on 2010-02-10 01:10:59 -->
