<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Brian Webster - Blog &#187; JavaScript</title>
	<atom:link href="http://bdwebster.com/category/javascript/feed/" rel="self" type="application/rss+xml" />
	<link>http://bdwebster.com</link>
	<description>Web Development and Other Ramblings</description>
	<lastBuildDate>Thu, 05 Jan 2012 08:20:53 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='bdwebster.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Brian Webster - Blog &#187; JavaScript</title>
		<link>http://bdwebster.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://bdwebster.com/osd.xml" title="Brian Webster - Blog" />
	<atom:link rel='hub' href='http://bdwebster.com/?pushpress=hub'/>
		<item>
		<title>Firefox Add-On &#8211; NoScript</title>
		<link>http://bdwebster.com/2008/11/13/firefox-add-on-noscript/</link>
		<comments>http://bdwebster.com/2008/11/13/firefox-add-on-noscript/#comments</comments>
		<pubDate>Thu, 13 Nov 2008 06:24:17 +0000</pubDate>
		<dc:creator>bwebster</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[tools]]></category>

		<guid isPermaLink="false">http://bwebster.wordpress.com/?p=188</guid>
		<description><![CDATA[I recently received a new computer at work. One of the first software packages that I installed was FireFox, and made it my default browser. I then installed an Add-On called NoScript. This turns off all JavaScript on a web page. It gives you the option to either temporarily or permanently turn on the JavaScript [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bdwebster.com&amp;blog=1364781&amp;post=188&amp;subd=bwebster&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I recently received a new computer at work. One of the first software packages that I installed was <a href="http://www.mozilla.com/en-US/firefox/">FireFox</a>, and made it my default browser.</p>
<p>I then installed an Add-On called <a href="http://en.wikipedia.org/wiki/NoScript">NoScript</a>. This turns off all JavaScript on a web page. It gives you the option to either temporarily or permanently turn on the JavaScript for a given site.</p>
<p>For example, I have JavaScript permanently turned on for the <a href="http://www.extension.iastate.edu/">ISU Extension</a> web site. I also have it turned on for some of the other sites I visit regularly. On other sites, I will choose to temporarily allow JavaScript.</p>
<p>I never allow JavaScript from certain sites, especially when the JavaScript is trying to run from a third party site. Another piece of JavaScript that I never allow is the one from Google Analytics. Google knows enough about me without me giving them that much information about my browsing habits.</p>
<p>For many pages, loading them without running the JavaScript doesn&#8217;t affect them too much. For others, it will change the functionality of the pages, but they still work.  For example, on the <a href="http://www.extension.org/">eXtension</a> home page, the rotating images simply become a series of individual images. You can still navigate around the site without any problem. For other pages, not having JavaScript enabled completely breaks them.</p>
<p>Here are my reasons for running NoScript:</p>
<ul>
<li>Many pages are less cluttered. A lot of times, the ads and other annoying &#8220;features&#8221; are implemented in JavaScript. With NoScript, you don&#8217;t see a lot of this stuff.</li>
<li>Ability to block Google Analytics, and other tracking systems from seeing where you are browsing.</li>
<li>Most importantly, security.  Many times a hacked page will try loading a JavaScript file from a third party server. If you don&#8217;t allow scripts from unknown sources, they won&#8217;t run.</li>
</ul>
<p>Here is where you can <a href="https://addons.mozilla.org/en-US/firefox/addon/722">download NoScript</a>.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/bwebster.wordpress.com/188/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/bwebster.wordpress.com/188/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/bwebster.wordpress.com/188/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/bwebster.wordpress.com/188/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/bwebster.wordpress.com/188/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/bwebster.wordpress.com/188/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/bwebster.wordpress.com/188/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/bwebster.wordpress.com/188/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/bwebster.wordpress.com/188/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/bwebster.wordpress.com/188/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/bwebster.wordpress.com/188/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/bwebster.wordpress.com/188/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/bwebster.wordpress.com/188/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/bwebster.wordpress.com/188/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bdwebster.com&amp;blog=1364781&amp;post=188&amp;subd=bwebster&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://bdwebster.com/2008/11/13/firefox-add-on-noscript/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1798b32afe4a40dced3ce24d286d272e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">bwebster</media:title>
		</media:content>
	</item>
		<item>
		<title>Connecting JavaScript with a TextBox</title>
		<link>http://bdwebster.com/2007/07/26/connecting-javascript-with-a-textbox/</link>
		<comments>http://bdwebster.com/2007/07/26/connecting-javascript-with-a-textbox/#comments</comments>
		<pubDate>Thu, 26 Jul 2007 13:49:31 +0000</pubDate>
		<dc:creator>bwebster</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[JavaScript]]></category>

		<guid isPermaLink="false">http://bdwebster.com/2007/07/26/connecting-javascript-with-a-textbox/</guid>
		<description><![CDATA[Yesterday I was working on a web application where we wanted to have a JavaScript function run when the user changes a TextBox. It was a simple function, which took three input values and performs calculations to generate two additional values. I soon discovered two issues when working with JavaScript in ASP.NET. The first is [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bdwebster.com&amp;blog=1364781&amp;post=19&amp;subd=bwebster&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p style="text-align:left;"> Yesterday I was working on a web application where we wanted to have a JavaScript function run when the user changes a TextBox.  It was a simple function, which took three input values and performs calculations to generate two additional values. I soon discovered two issues when working with JavaScript in ASP.NET.  The first is that the TextBox control is server-side, so it doesn&#8217;t include the client-side &#8220;onclick&#8221; attribute.  Second, is that when .NET generates the input box, it adds the ID of the parent container to the ID of the TextBox, for example <em>ID=&#8221;TextBox1&#8243;</em> may become <em>ID=&#8221;ctl00_ContentPlaceHolder1_TextBox1&#8243;</em>.</p>
<p>Doing an Internet search, I found two solutions to the first issue.  One option is to include the attribute <em>onchange=&#8221;myJavaScriptFunction()&#8221;</em> in the TextBox control. Visual Studio will give you a warning, but it does work.  The second option is to include the following line of code in the Page_ Load function:</p>
<pre>TextBox1.Attributes.Add("onchange", "myJavaScriptFunction()");</pre>
<p>I prefer this method because Visual Studio doesn&#8217;t flag it.</p>
<p>To solve the second issue, I found an example where they used the ClientID attribute of the TextBox Control to find the element in JavaScript.  Here is a sample JavaScript Function that does a popup alert, giving the value that was entered in TextBox1:</p>
<pre>function myJavaScriptFunction()
{
  var myField = document.getElementById("&lt;%= TextBox1.ClientID %&gt;");

  alert(myField.value);
}</pre>
<p>This is a kind of ugly, but it works. You can create as many variables as you need to point to your .NET controls.  The function I wrote yesterday had 5 of these temporary variables. Seems like a lot of work to assign values to a couple readonly fields in the form.</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/bwebster.wordpress.com/19/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/bwebster.wordpress.com/19/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/bwebster.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/bwebster.wordpress.com/19/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/bwebster.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/bwebster.wordpress.com/19/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/bwebster.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/bwebster.wordpress.com/19/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/bwebster.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/bwebster.wordpress.com/19/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/bwebster.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/bwebster.wordpress.com/19/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/bwebster.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/bwebster.wordpress.com/19/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/bwebster.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/bwebster.wordpress.com/19/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bdwebster.com&amp;blog=1364781&amp;post=19&amp;subd=bwebster&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://bdwebster.com/2007/07/26/connecting-javascript-with-a-textbox/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1798b32afe4a40dced3ce24d286d272e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">bwebster</media:title>
		</media:content>
	</item>
	</channel>
</rss>
