<?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>nerdboy.co.uk &#187; Javascript</title>
	<atom:link href="http://www.nerdboy.co.uk/category/javascript/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.nerdboy.co.uk</link>
	<description>nerdboy blog - web development stuff</description>
	<lastBuildDate>Mon, 06 Feb 2012 14:31:18 +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>Confirm your email &#8211; how to stop copy and paste</title>
		<link>http://www.nerdboy.co.uk/2012/02/confirm-your-email-how-to-stop-copy-and-paste/</link>
		<comments>http://www.nerdboy.co.uk/2012/02/confirm-your-email-how-to-stop-copy-and-paste/#comments</comments>
		<pubDate>Fri, 03 Feb 2012 17:14:09 +0000</pubDate>
		<dc:creator></dc:creator>
				<category><![CDATA[Javascript]]></category>

		<guid isPermaLink="false">http://www.nerdboy.co.uk/?p=221</guid>
		<description><![CDATA[Whenever I come across a web-form that asks me to retype my email to confirm it, I copy and paste the email.  Saves me typing, and I&#8217;m pretty sure 99.9% of the time I typed it right the first time. I just came across a form that stopped me pasting into it.  Rather annoying, but [...]]]></description>
			<content:encoded><![CDATA[<p>Whenever I come across a web-form that asks me to retype my email to confirm it, I copy and paste the email.  Saves me typing, and I&#8217;m pretty sure 99.9% of the time I typed it right the first time.</p>
<p>I just came across a form that stopped me pasting into it.  Rather annoying, but could be useful if you really want to force users to do this.</p>
<p>Easily done.  Just add  onpaste=&#8221;return false&#8221; inside the &lt;input&gt; tag.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.nerdboy.co.uk/2012/02/confirm-your-email-how-to-stop-copy-and-paste/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Get longitude and latitude from Google maps</title>
		<link>http://www.nerdboy.co.uk/2010/12/get-longitude-and-latitude-from-google-maps/</link>
		<comments>http://www.nerdboy.co.uk/2010/12/get-longitude-and-latitude-from-google-maps/#comments</comments>
		<pubDate>Fri, 17 Dec 2010 22:09:45 +0000</pubDate>
		<dc:creator>nerdboy</dc:creator>
				<category><![CDATA[Javascript]]></category>

		<guid isPermaLink="false">http://www.nerdboy.co.uk/?p=155</guid>
		<description><![CDATA[Need to get the longitude and latitude for a particular place? Find it on Google maps, double click it to will centre the map where you clicked. Then paste this in the address bar: I&#8217;ve added this as a bookmarklet for ease of use. To do the same drag this into your browser toolbar Google [...]]]></description>
			<content:encoded><![CDATA[<p>Need to get the longitude and latitude for a particular place?<br />
Find it on Google maps, double click it to will centre the map where you clicked.<br />
Then paste this in the address bar:</p>
<pre class="brush: jscript; title: ; notranslate">
javascript:void(prompt('',gApplication.getMap().getCenter()));
</pre>
<p>I&#8217;ve added this as a bookmarklet for ease of use.</p>
<p>To do the same drag this into your browser toolbar <a href="javascript:void(prompt('',gApplication.getMap().getCenter()));">Google Map Centre</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.nerdboy.co.uk/2010/12/get-longitude-and-latitude-from-google-maps/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>jQuery and asp.net validation controls</title>
		<link>http://www.nerdboy.co.uk/2009/04/jquery-and-aspnet-validation-controls/</link>
		<comments>http://www.nerdboy.co.uk/2009/04/jquery-and-aspnet-validation-controls/#comments</comments>
		<pubDate>Sat, 11 Apr 2009 06:08:51 +0000</pubDate>
		<dc:creator>nerdboy</dc:creator>
				<category><![CDATA[asp.net]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[jquery]]></category>

		<guid isPermaLink="false">http://www.nerdboy.co.uk/?p=101</guid>
		<description><![CDATA[Just found a  nice tip to check with jQuery if all built-in asp.net validation controls on a form are valid. As an asp.net developer and jQuery advocate I know I&#8217;m going to find this tip very useful http://devoma.com/post/JQuery-and-ASPNET-validators.aspx]]></description>
			<content:encoded><![CDATA[<p>Just found a  nice tip to check with jQuery if all built-in asp.net validation controls on a form are valid.</p>
<p>As an asp.net developer and jQuery advocate I know I&#8217;m going to find this tip very useful</p>
<p><a href="http://devoma.com/post/JQuery-and-ASPNET-validators.aspx">http://devoma.com/post/JQuery-and-ASPNET-validators.aspx</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.nerdboy.co.uk/2009/04/jquery-and-aspnet-validation-controls/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>ASP.NET Event Validation and “Invalid Callback Or Postback Argument”</title>
		<link>http://www.nerdboy.co.uk/2009/02/aspnet-event-validation-and-%e2%80%9cinvalid-callback-or-postback-argument%e2%80%9d/</link>
		<comments>http://www.nerdboy.co.uk/2009/02/aspnet-event-validation-and-%e2%80%9cinvalid-callback-or-postback-argument%e2%80%9d/#comments</comments>
		<pubDate>Thu, 05 Feb 2009 21:15:05 +0000</pubDate>
		<dc:creator>nerdboy</dc:creator>
				<category><![CDATA[asp.net]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[jquery]]></category>

		<guid isPermaLink="false">http://www.nerdboy.co.uk/?p=59</guid>
		<description><![CDATA[I was getting this and pulling my hair out. My button (server-side) was pumping out a bit of javascript  And this kept causing the error. I tried using the prescribed fix: ClientScript.RegisterForEventValidation(mycontrol.uniqueid) in the prerender.  Still got the error. Here&#8217;s how I fixed it.  RegisterStartupScript does the job of running at startup by emiting the js right [...]]]></description>
			<content:encoded><![CDATA[<p>I was getting this and pulling my hair out.</p>
<p>My button (server-side) was pumping out a bit of javascript </p>
<pre class="brush: vb; title: ; notranslate">Page.ClientScript.RegisterStartupScript(GetType(String),
         &quot;loginunsuccessful&quot;, &quot;&lt;script type=&quot;&quot;text/javascript&quot;&quot;&gt;
         alert('Login unsuccessful – please try again');&lt;/script&gt;&quot;)</pre>
<p>And this kept causing the error.</p>
<p>I tried using the prescribed fix: ClientScript.RegisterForEventValidation(mycontrol.uniqueid) in the prerender.  Still got the error.</p>
<p><strong>Here&#8217;s how I fixed it.</strong>  RegisterStartupScript does the job of running at startup by emiting the js right at the foot of the page.  I wrapped my JS in jQuery&#8217;s own onload code.</p>
<pre class="brush: vb; title: ; notranslate">Page.ClientScript. RegisterStartupScript(GetType(String),
          &quot;loginunsuccessful&quot;, &quot;&lt;script type=&quot;&quot;text/javascript&quot;&quot;&gt;
          $(document).ready(function(){alert('Login unsuccessful – please try again');});
          &lt;/script&gt;&quot;)</pre>
<p>Still the same error, I then changed to using Page.ClientScript.RegisterClientScriptBlock, which emits the JS in the midst of the html and hey presto no errors.  This is without using the RegisterForEventValidation I&#8217;d like to add.</p>
<p>Final code:</p>
<pre class="brush: vb; title: ; notranslate">Page.ClientScript.RegisterClientScriptBlock(GetType(String),
          &quot;loginunsuccessful&quot;, &quot;&lt;script type=&quot;&quot;text/javascript&quot;&quot;&gt;
          $(document).ready(function(){BlockAlert('Login unsuccessful – please try again');});
          &lt;/script&gt;&quot;)</pre>
<p>Simple to fix when you know how.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.nerdboy.co.uk/2009/02/aspnet-event-validation-and-%e2%80%9cinvalid-callback-or-postback-argument%e2%80%9d/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Use jQuery to replace &lt;body onunload=&quot;GUnload()&quot;&gt;</title>
		<link>http://www.nerdboy.co.uk/2009/01/use-jquery-to-replace-body-onunload/</link>
		<comments>http://www.nerdboy.co.uk/2009/01/use-jquery-to-replace-body-onunload/#comments</comments>
		<pubDate>Mon, 26 Jan 2009 16:03:26 +0000</pubDate>
		<dc:creator>nerdboy</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[jquery]]></category>

		<guid isPermaLink="false">http://www.nerdboy.co.uk/?p=54</guid>
		<description><![CDATA[When using Google maps it&#8217;s important to use GUnload on the page&#8217;s unload event. Fine when you can access the body tag directly&#8230;. But if you have the Google map functionality wrapped inside an ascx you need a different approach. After a big of digging I found how to use jQuery to &#8220;catch&#8221; the unload [...]]]></description>
			<content:encoded><![CDATA[<p>When using Google maps it&#8217;s important to use GUnload on the page&#8217;s unload event.  Fine when you can access the body tag directly&#8230;.  But if you have the Google map functionality wrapped inside an ascx you need a different approach.</p>
<p>After a big of digging I found how to use jQuery to &#8220;catch&#8221; the unload event.  In case anyone else needs it:</p>
<pre class="brush: jscript; title: ; notranslate">$(window).unload( function () { GUnload(); } );</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.nerdboy.co.uk/2009/01/use-jquery-to-replace-body-onunload/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
		<item>
		<title>Microsoft adopt jQuery</title>
		<link>http://www.nerdboy.co.uk/2008/10/microsoft-adopt-jquery/</link>
		<comments>http://www.nerdboy.co.uk/2008/10/microsoft-adopt-jquery/#comments</comments>
		<pubDate>Wed, 01 Oct 2008 10:09:08 +0000</pubDate>
		<dc:creator>nerdboy</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[jquery]]></category>

		<guid isPermaLink="false">http://www.nerdboy.co.uk/?p=3</guid>
		<description><![CDATA[I&#8217;ve been using jQuery for ages and I love it.  Finally a very easy, crossbrowser, method to target any element or group of elements on the page. Plus it has some very straightforward and powerful ajax features built in. I did look at the whole ajax.net thing a while back and it was way too [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been using jQuery for ages and I love it.  Finally a very easy, crossbrowser, method to target any element or group of elements on the page.</p>
<p>Plus it has some very straightforward and powerful ajax features built in.</p>
<p>I did look at the whole ajax.net thing a while back and it was way too bloated for me to give it a serious look.</p>
<p>I&#8217;ve just heard the Microsoft have woken up to jQuery too.  In future versions of Visual Studio jQuery intellisense wil be built it.  Thanks Microsoft!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.nerdboy.co.uk/2008/10/microsoft-adopt-jquery/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

