<?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>Justin Carmony &#187; jQuery</title>
	<atom:link href="http://www.justincarmony.com/blog/tag/jquery/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.justincarmony.com/blog</link>
	<description>Web Designer &#38; Software Engineer</description>
	<lastBuildDate>Sun, 13 May 2012 20:36:25 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>jQuery UI &#8211; Disable Title On Dialog</title>
		<link>http://www.justincarmony.com/blog/2010/09/15/jquery-ui-disable-title-on-dialog/</link>
		<comments>http://www.justincarmony.com/blog/2010/09/15/jquery-ui-disable-title-on-dialog/#comments</comments>
		<pubDate>Thu, 16 Sep 2010 05:56:35 +0000</pubDate>
		<dc:creator>Justin Carmony</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Web Design]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[jQuery UI]]></category>
		<category><![CDATA[Tips and Tricks]]></category>

		<guid isPermaLink="false">http://www.justincarmony.com/blog/?p=580</guid>
		<description><![CDATA[For some reason, this was turning out to be kind of hard to accomplish, and everyone on the internet wanted to do it with JavaScript hacks. My issue was if the JavaScript hack didn&#8217;t execute fast enough, causing the title to flash for just a second, so I&#8217;d much rather do it with CSS. Unfortunately, ...
Related posts:<ol>
<li><a href='http://www.justincarmony.com/blog/2009/09/15/jquery-tip-better-toggle/' rel='bookmark' title='jQuery Tip: Better Toggle'>jQuery Tip: Better Toggle</a> <small>For many web developers, jQuery is the most awesome JavaScript...</small></li>
<li><a href='http://www.justincarmony.com/blog/2008/10/24/empowering-javascript-through-jquery/' rel='bookmark' title='Empowering JavaScript Through jQuery'>Empowering JavaScript Through jQuery</a> <small>Once I discovered jQuery, my life as a web developer...</small></li>
<li><a href='http://www.justincarmony.com/blog/2008/01/07/asp-net-20-gridviews-hyperlinkfield-and-javascript/' rel='bookmark' title='ASP .NET 2.0, GridViews, HyperLinkField, and JavaScript'>ASP .NET 2.0, GridViews, HyperLinkField, and JavaScript</a> <small>I&#8217;ve found some interesting notes on ASP .NET&#8217;s GridView, it&#8217;s...</small></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><a href="http://c747925.r25.cf2.rackcdn.com/blog/wp-content/uploads/2010/09/jquery-ui-logo.png"><img src="http://c747925.r25.cf2.rackcdn.com/blog/wp-content/uploads/2010/09/jquery-ui-logo.png" alt="" title="jquery-ui-logo" width="200" height="200" class="alignright size-full wp-image-583" /></a>For some reason, this was turning out to be kind of hard to accomplish, and everyone on the internet wanted to do it with JavaScript hacks. My issue was if the JavaScript hack didn&#8217;t execute fast enough, causing the title to flash for just a second, so I&#8217;d much rather do it with CSS. Unfortunately, there are no built in ways to hide it in jQuery. However, there is an option you can pass in the <strong>.dialog()</strong> method: <strong>dialogClass</strong>. This places a custom class in the main div element, allowing you to do something like this:</p>
<pre class="brush: jscript; title: ; notranslate">
function selectLocation()
{
	$('#modalSelectLocation').dialog({
			modal: true,
			dialogClass: 'modalSelectLocation'
			,buttons: {
				Cancel: function(){
					$(this).dialog('close');
				}
				,Continue: function() {
					alert('goto-buy');
				}

			}
		});
}
</pre>
<p>with the css of:</p>
<pre class="brush: css; title: ; notranslate">
.modalSelectLocation .ui-dialog-titlebar { display:none; }
</pre>
<p>Tada! No more Title Bar. However, make sure to have some form of cancel button.</p>
<p>Related posts:<ol>
<li><a href='http://www.justincarmony.com/blog/2009/09/15/jquery-tip-better-toggle/' rel='bookmark' title='jQuery Tip: Better Toggle'>jQuery Tip: Better Toggle</a> <small>For many web developers, jQuery is the most awesome JavaScript...</small></li>
<li><a href='http://www.justincarmony.com/blog/2008/10/24/empowering-javascript-through-jquery/' rel='bookmark' title='Empowering JavaScript Through jQuery'>Empowering JavaScript Through jQuery</a> <small>Once I discovered jQuery, my life as a web developer...</small></li>
<li><a href='http://www.justincarmony.com/blog/2008/01/07/asp-net-20-gridviews-hyperlinkfield-and-javascript/' rel='bookmark' title='ASP .NET 2.0, GridViews, HyperLinkField, and JavaScript'>ASP .NET 2.0, GridViews, HyperLinkField, and JavaScript</a> <small>I&#8217;ve found some interesting notes on ASP .NET&#8217;s GridView, it&#8217;s...</small></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.justincarmony.com/blog/2010/09/15/jquery-ui-disable-title-on-dialog/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>My 2009 Technology Recap</title>
		<link>http://www.justincarmony.com/blog/2009/12/23/my-2009-technology-recap/</link>
		<comments>http://www.justincarmony.com/blog/2009/12/23/my-2009-technology-recap/#comments</comments>
		<pubDate>Wed, 23 Dec 2009 18:55:31 +0000</pubDate>
		<dc:creator>Justin Carmony</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Web Design]]></category>
		<category><![CDATA[advice]]></category>
		<category><![CDATA[Blogging]]></category>
		<category><![CDATA[conference]]></category>
		<category><![CDATA[Databases]]></category>
		<category><![CDATA[fun]]></category>
		<category><![CDATA[Goals]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Presentation]]></category>
		<category><![CDATA[scaling]]></category>
		<category><![CDATA[UPHPU]]></category>
		<category><![CDATA[utah]]></category>

		<guid isPermaLink="false">http://www.justincarmony.com/blog/2009/12/23/my-2009-technology-recap/</guid>
		<description><![CDATA[Its been two years now that I&#8217;ve been a more or less &#8220;serious blogger.&#8221; I had using the term blogger, since when people hear about blogs, they think of people either detailing their entire lives, or pumping some angel. For me, blogging has just been a way to share information with people I know locally, ...
Related posts:<ol>
<li><a href='http://www.justincarmony.com/blog/2009/09/16/speaking-utah-open-source-conference-2009/' rel='bookmark' title='Speaking: Utah Open Source Conference 2009'>Speaking: Utah Open Source Conference 2009</a> <small>I will be speaking this year at the Utah Open...</small></li>
<li><a href='http://www.justincarmony.com/blog/2008/07/15/web-development-10-years-ago-now/' rel='bookmark' title='Web Development 10-Years Ago &amp; Now'>Web Development 10-Years Ago &#038; Now</a> <small>This week&#8217;s blogging challenge was our computer software now and...</small></li>
<li><a href='http://www.justincarmony.com/blog/2009/09/14/so-you-want-to-be-a-web-developer/' rel='bookmark' title='So You Want To Be A Web Developer?'>So You Want To Be A Web Developer?</a> <small>&lt;tangent&gt; This last week I&#8217;ve been talking with my brother...</small></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Its been two years now that I&#8217;ve been a more or less &#8220;serious blogger.&#8221; I had using the term blogger, since when people hear about blogs, they think of people either detailing their entire lives, or pumping some angel. For me, blogging has just been a way to share information with people I know locally, and those I don&#8217;t even know who find my blog via searching. I&#8217;ve had a few spurts where I blogged quite frequently, but for the most part it was just here and there.</p>
<p>I&#8217;ve gone back and looked at this year of 2009, and the things I&#8217;ve blogged about, and I thought I&#8217;d give a little recap.</p>
<p><b>My CSS Conversion</b></p>
<p>At the beginning of the year I realized I had <a href="http://www.justincarmony.com/blog/2009/01/08/css-im-100-converted/">100% percent to using CSS</a>. I&#8217;m still a little in awe that being such a table junkie I finally did it. There were a few key things that I did to help me learn all the difficult things with CSS. I hope I can help some poor web developer out there understand their CSS a little better.</p>
<p><b>A Year of PHP IDEs</b></p>
<p>I really invested some time in trying out and experimenting with <a href="http://www.justincarmony.com/blog/2009/02/06/aptana-studio-php-ide-alternative-to-pdt-zend-studio/">several PHP Integrated Development Environments (IDEs)</a>. I had been using Zend Studio for several years, however more and more I found myself frustrated with it&#8217;s quirks. However, I haven&#8217;t had time yet to blog about the new IDE I am using, <a href="http://netbeans.org/">NetBeans</a>. I&#8217;ve made the switch from Zend Studio to NetBeans, and while I&#8217;m not completely sold, I&#8217;m still giving it some time. Maybe over christmas break I&#8217;ll blog some about it.</p>
<p><b>Interesting Challenges w/ MySQL</b></p>
<p>While I haven&#8217;t blogged about most of them, I have had some interesting challenges w/ MySQL over the last year. One was converting <a href="http://www.justincarmony.com/blog/2009/01/12/mysql-40-million-rows-myisam-innodb/">40 Million rows from a MyISAM engine to an InnoDB Engine</a>. I&#8217;ve been having some serious heart-to-heart conversations with MySQL (metaphorically of course) on how I&#8217;m going to scale it to millions and billions of rows. I think I&#8217;ve mapped out in my head how we&#8217;re going to handle it for <a href="http://www.datingdna.com/">Dating DNA</a>. That will be one challenge I&#8217;ll be addressing in 2010.</p>
<p><b>New Blog Design</b></p>
<p>This year I got around to <a href="http://www.justincarmony.com/blog/2009/02/20/new-blog-design/">re-designing my blog using the Carrington Theme as a base</a>. I kinda like it, but it still could use a little more polish. One day I&#8217;ll find time to give it that extra polish.</p>
<p><b>Memcached</b></p>
<p>This year I really got into the theory on how to <a href="http://www.justincarmony.com/blog/2009/05/20/memcached-simple-effective-and-powerful/">design an application with Memcached</a>. I&#8217;ve decreased the load on several websites by using it, and wrote an <a href="http://www.justincarmony.com/blog/2009/06/24/writing-effictive-php-caches-with-memcached/">in-depth article on the theory of caching, and how to implement it effectively</a>. I&#8217;ve been amazed at how well it works, and that I hadn&#8217;t used it before.</p>
<p><b>A Year of Presentations</b></p>
<p>I&#8217;ve given two presentations this year, my <a href="http://www.justincarmony.com/blog/2009/06/24/writing-effictive-php-caches-with-memcached/">Memcached</a> presentation at UPHPU, and my &#8220;<a href="http://www.justincarmony.com/blog/2009/10/11/presentation-real-life-scaling/">Real Life Scaling</a>&#8221; presentation at the Utah Open Source Conference. I got great feedback from both presentations, and I look forward to what I&#8217;ll present on this upcoming year. I&#8217;m thinking about putting together a presentation called &#8220;Being a Web Ninja with jQuery,&#8221; and showing of the dozen of awesome applications I&#8217;ve built using jQuery.</p>
<p><b>Utah Open Source Conference 2009</b></p>
<p>This year I helped organize and throw together the Utah Open Source Conference. I was made the Sponsorship Manager, and it was interesting trying to talk to companies in a recession about donating to a non-profit conference. I haven&#8217;t had a chance to blog about different techniques on how to professional ask for money for something like this, but hopefully in 2010 I&#8217;ll be able to share some insights.</p>
<h2>Things I Didn&#8217;t Blog About</h2>
<p>There were a lot of things I didn&#8217;t get around to blogging about this year. I&#8217;ll quickly touch on them here, and hopefully in 2010 I&#8217;ll be able to blog about them more.</p>
<p><strong>Web Services</strong> &#8211; I&#8217;ve done a LOT of web service work. Web services provide a unique challenge, since many times its hard to debug them. At my old job, one of the biggest challenges is we really couldn&#8217;t debug our web services until all of the other pieces of the puzzle were done. Then we spent long hours with trial and error, debugging via dumping logs. I&#8217;ve learned a lot of tricks with PHP and web services. Hopefully I&#8217;ll be blog more about those soon.</p>
<p><b>Performance Tuning LAMP</b> &#8211; I&#8217;ve had to do a lot of tuning to keep the Dating DNA website afloat. Because of the awesomeness of our iPhone apps, we&#8217;ve had a lot of load on our web servers. There are a lot of things you can do to get the LAMP stack to run well.</p>
<p><b>Alienware Arena</b> &#8211; Here was a fun little project I was able to crank out for probably the largest client I&#8217;ve done work for: Dell. We made them a website for their Alienware brand called &#8220;<a href="http://www.alienwarearena.com/">Alienware Arena</a>.&#8221;</p>
<p>
<a href="http://c747925.r25.cf2.rackcdn.com/blog/wp-content/uploads/2009/12/AlienwareArena.png"><img src="http://c747925.r25.cf2.rackcdn.com/blog/wp-content/uploads/2009/12/AlienwareArena-tm.jpg" width="400" height="352" alt="AlienwareArena.png" /></a></p>
<p>There were a lot of challenges to this website, mainly timeline and budget. But we were able to walk away happy with our work, and the Dell / Alienware team were really happy. It was interesting going through and trying to copy / mimic the look and feel of the Alienware website. I&#8217;m really proud of what we made.</p>
<p><b>Never Ending iPhone App Store Saga</b> &#8211; Anyone who knows me has heard of the bloody wars that my current employer has had with Apple, their iPhone, and the App Store. The ridiculous approval process, the extremely long wait periods, and Apple&#8217;s OCD when it comes to their phone. I won&#8217;t say much anything else on the topic, but boy it has been frustrating.</p>
<h2>What to Expect with 2010</h2>
<p>Boy, 2010 will be interesting. What to expect? I&#8217;ll be doing some pretty sick programming in jQuery, as I&#8217;ll be adding integrating chat to the Dating DNA website. What else? A <b><i>lot</i> <span style="font-weight: normal;">more when it comes to integrating websites into other social network platforms.</span></b></p>
<p><b><span style="font-weight: normal;">From a business platform, 2010 will be a lot of work spent on taking some great ideas and trying to monetize them. While working on awesome stuff is great, its important to pay the bills with them. I will have an entire year to sign up Sponsors for the 2010 UTOS Conference instead of 2 short months.</span></b></p>
<p>Hopefully I&#8217;ll get in a better habit of documenting my discoveries and solutions here in my blog. Sharing information is the best way to help everyone out.</p>
<p>I hope everyone has a happy holiday and good luck in the new year! 2010, here we come!</p>
<p>Related posts:<ol>
<li><a href='http://www.justincarmony.com/blog/2009/09/16/speaking-utah-open-source-conference-2009/' rel='bookmark' title='Speaking: Utah Open Source Conference 2009'>Speaking: Utah Open Source Conference 2009</a> <small>I will be speaking this year at the Utah Open...</small></li>
<li><a href='http://www.justincarmony.com/blog/2008/07/15/web-development-10-years-ago-now/' rel='bookmark' title='Web Development 10-Years Ago &amp; Now'>Web Development 10-Years Ago &#038; Now</a> <small>This week&#8217;s blogging challenge was our computer software now and...</small></li>
<li><a href='http://www.justincarmony.com/blog/2009/09/14/so-you-want-to-be-a-web-developer/' rel='bookmark' title='So You Want To Be A Web Developer?'>So You Want To Be A Web Developer?</a> <small>&lt;tangent&gt; This last week I&#8217;ve been talking with my brother...</small></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.justincarmony.com/blog/2009/12/23/my-2009-technology-recap/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>jQuery Tip: Better Toggle</title>
		<link>http://www.justincarmony.com/blog/2009/09/15/jquery-tip-better-toggle/</link>
		<comments>http://www.justincarmony.com/blog/2009/09/15/jquery-tip-better-toggle/#comments</comments>
		<pubDate>Tue, 15 Sep 2009 18:28:05 +0000</pubDate>
		<dc:creator>Justin Carmony</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Web Design]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://www.justincarmony.com/blog/?p=453</guid>
		<description><![CDATA[For many web developers, jQuery is the most awesome JavaScript library out there. For me, it has turned JavaScript from being a nightmare into a power tool. I love JavaScript now, where as before I truely hated it. Takes all the hassel out of most compatibility issues across browsers. I spend less time debuging it ...
Related posts:<ol>
<li><a href='http://www.justincarmony.com/blog/2008/10/24/empowering-javascript-through-jquery/' rel='bookmark' title='Empowering JavaScript Through jQuery'>Empowering JavaScript Through jQuery</a> <small>Once I discovered jQuery, my life as a web developer...</small></li>
<li><a href='http://www.justincarmony.com/blog/2008/01/07/asp-net-20-gridviews-hyperlinkfield-and-javascript/' rel='bookmark' title='ASP .NET 2.0, GridViews, HyperLinkField, and JavaScript'>ASP .NET 2.0, GridViews, HyperLinkField, and JavaScript</a> <small>I&#8217;ve found some interesting notes on ASP .NET&#8217;s GridView, it&#8217;s...</small></li>
<li><a href='http://www.justincarmony.com/blog/2008/12/03/php-singletons-sub-classing-and-has-a-relationships/' rel='bookmark' title='PHP Singletons, Sub-Classing, and HAS-A Relationships'>PHP Singletons, Sub-Classing, and HAS-A Relationships</a> <small>I&#8217;ve been very busy these last fews weeks and have...</small></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>For many web developers, <a title="jQuery JavaScript " href="http://jquery.com/" target="_blank">jQuery</a> is the most awesome JavaScript library out there. For me, it has turned JavaScript from being a nightmare into a power tool. I love JavaScript now, where as before I truely hated it. Takes all the hassel out of <em>most</em> compatibility issues across browsers. I spend less time debuging it and more time writing it. While I&#8217;m on my goal to write more blog posts, I&#8217;m going to share a few jQuery tricks.</p>
<p>Today&#8217;s trick is using a better toggle method than the standard <a href="http://docs.jquery.com/Events/toggle" target="_self">toggle function</a>. Don&#8217;t get me wrong, it works great, but only if it is the only method for &#8220;toggling&#8221; the given element. Traditionally you pass is several functions, typically two. Function #1 that executes the first time that the event is fired, and a second function that fires the second time you click on it.</p>
<p>The problem arrises if you want to have more control over who, what, and where executes the toggles. Lets say you have a hidden div that is rather large, and a link above it that says &#8220;More Information.&#8221; You click the link, it fires Function A and it slides down the div. Since it is so big, at the bottom you of the div you put a link that says &#8220;Close.&#8221; The user clicks this link, and it hides the div again. The problem is the toggle function isn&#8217;t away that another part of the website hid the div. So if the user clicks &#8220;More Information&#8221;, it will still call Function #2, which will re-display the hiding annimation.</p>
<p>How do we solve this problem? Instead of using the toggle function, we write our own like so:</p>
<pre class="brush: xml; title: ; notranslate">

&lt;h2&gt;Better Toggle Method&lt;/h2&gt;
&lt;div id=&quot;new&quot;&gt;
  &lt;a href=&quot;#&quot; class=&quot;toggle&quot;&gt;Toggle More&lt;/a&gt;
  &lt;div class=&quot;more&quot; style=&quot;display:none;&quot;&gt;
    &lt;p&gt;More Text Here&lt;/p&gt;
    &lt;p&gt;&lt;a href=&quot;#&quot; class=&quot;close&quot;&gt;Close&lt;/a&gt;&lt;/p&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
  // Assign Events on Page Ready
  $(document).ready(function(){
    // Create Toggle Function
    $('#new .toggle').click(function(){
      // If display is none, that means it is hidden
      if($('#new .more').css('display') == 'none')
      {
        $('#new .more').slideDown();
      }
      // Second Click
      else
      {
        $('#new .more').slideUp();
      }
    });

    // Create Close Function
    $('#new .close').click(function(){
      $('#new .more').slideUp();
    });
  });
&lt;/script&gt;
</pre>
<p>If you want to see an example of the old method, as well as the new method in action, you can see them <a href="/jquery/better-toggle.html" target="_blank">here</a>. Hopefully this can help you out. </p>
<p>Related posts:<ol>
<li><a href='http://www.justincarmony.com/blog/2008/10/24/empowering-javascript-through-jquery/' rel='bookmark' title='Empowering JavaScript Through jQuery'>Empowering JavaScript Through jQuery</a> <small>Once I discovered jQuery, my life as a web developer...</small></li>
<li><a href='http://www.justincarmony.com/blog/2008/01/07/asp-net-20-gridviews-hyperlinkfield-and-javascript/' rel='bookmark' title='ASP .NET 2.0, GridViews, HyperLinkField, and JavaScript'>ASP .NET 2.0, GridViews, HyperLinkField, and JavaScript</a> <small>I&#8217;ve found some interesting notes on ASP .NET&#8217;s GridView, it&#8217;s...</small></li>
<li><a href='http://www.justincarmony.com/blog/2008/12/03/php-singletons-sub-classing-and-has-a-relationships/' rel='bookmark' title='PHP Singletons, Sub-Classing, and HAS-A Relationships'>PHP Singletons, Sub-Classing, and HAS-A Relationships</a> <small>I&#8217;ve been very busy these last fews weeks and have...</small></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.justincarmony.com/blog/2009/09/15/jquery-tip-better-toggle/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Empowering JavaScript Through jQuery</title>
		<link>http://www.justincarmony.com/blog/2008/10/24/empowering-javascript-through-jquery/</link>
		<comments>http://www.justincarmony.com/blog/2008/10/24/empowering-javascript-through-jquery/#comments</comments>
		<pubDate>Sat, 25 Oct 2008 00:31:27 +0000</pubDate>
		<dc:creator>Justin Carmony</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[ASP .NET]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Web 2.0]]></category>
		<category><![CDATA[Web Design]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://www.justincarmony.com/blog/2008/10/24/empowering-javascript-through-jquery/</guid>
		<description><![CDATA[Once I discovered jQuery, my life as a web developer changed. There are few libraries, tools, etc. that I can honestly say have completely changed the way I code. In all honesty, jQuery makes the difficult aspects of JavaScript and turns them into a strength. I recommend it over any other JavaScript library I know. ...
Related posts:<ol>
<li><a href='http://www.justincarmony.com/blog/2008/01/07/asp-net-20-gridviews-hyperlinkfield-and-javascript/' rel='bookmark' title='ASP .NET 2.0, GridViews, HyperLinkField, and JavaScript'>ASP .NET 2.0, GridViews, HyperLinkField, and JavaScript</a> <small>I&#8217;ve found some interesting notes on ASP .NET&#8217;s GridView, it&#8217;s...</small></li>
<li><a href='http://www.justincarmony.com/blog/2008/04/21/iphone-web-development-controlling-the-viewport-via-javascript/' rel='bookmark' title='iPhone Web Development: Controlling the viewport via Javascript'>iPhone Web Development: Controlling the viewport via Javascript</a> <small>Lately I&#8217;ve been doing a lot of iPhone web applications....</small></li>
<li><a href='http://www.justincarmony.com/blog/2008/07/15/web-development-10-years-ago-now/' rel='bookmark' title='Web Development 10-Years Ago &amp; Now'>Web Development 10-Years Ago &#038; Now</a> <small>This week&#8217;s blogging challenge was our computer software now and...</small></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Once I discovered <a href="http://jquery.com/">jQuery</a>, my life as a web developer changed. There are few libraries, tools, etc. that I can honestly say have completely changed the way I code. In all honesty, jQuery makes the difficult aspects of JavaScript and turns them into a strength. I recommend it over any other JavaScript library I know. It is smaller, leaner, straight forwards, and more powerful than anything out there. Large companies like Google, Microsoft, and Dell use it. Microsoft is now including jQuery in Visual Studio, their powerful IDE for making websites. If anything, I have yet to meet a person who has used jQuery and has gone to anything else.</p>
<p>Learning anything new can be challenging, so I thought I would share my resources on learning jQuery. First off you need to check out <a href="http://docs.jquery.com/Tutorials">jQuery&#8217;s tutorial section</a>. I recommend just about every tutorial on there, and each will help you understand jQuery a little better. Once you&#8217;ve gone through the tutorials on how jQuery, sit down and make something meaningful with it. Don&#8217;t just follow the tutorials, but actually try to use it in your next project. Soon you&#8217;ll see how amazing jQuery can be. Last but not least, my absolute favorite quick reference is <a href="http://visualjquery.com/">Visual jQuery</a> by Remy Sharp &amp; Yehuda Katz. When ever I need to look up quickly how to do something, I use can find it within seconds on Visual jQuery.</p>
<p>I&#8217;m going to try to post at least one tip or trick with jQuery every week, not only to help me keep a history of my tricks, but to help others solve common problems. If anyone has any questions, please feel free to leave a comment and I&#8217;d be more than happy to answer any questions.</p>
<p>Related posts:<ol>
<li><a href='http://www.justincarmony.com/blog/2008/01/07/asp-net-20-gridviews-hyperlinkfield-and-javascript/' rel='bookmark' title='ASP .NET 2.0, GridViews, HyperLinkField, and JavaScript'>ASP .NET 2.0, GridViews, HyperLinkField, and JavaScript</a> <small>I&#8217;ve found some interesting notes on ASP .NET&#8217;s GridView, it&#8217;s...</small></li>
<li><a href='http://www.justincarmony.com/blog/2008/04/21/iphone-web-development-controlling-the-viewport-via-javascript/' rel='bookmark' title='iPhone Web Development: Controlling the viewport via Javascript'>iPhone Web Development: Controlling the viewport via Javascript</a> <small>Lately I&#8217;ve been doing a lot of iPhone web applications....</small></li>
<li><a href='http://www.justincarmony.com/blog/2008/07/15/web-development-10-years-ago-now/' rel='bookmark' title='Web Development 10-Years Ago &amp; Now'>Web Development 10-Years Ago &#038; Now</a> <small>This week&#8217;s blogging challenge was our computer software now and...</small></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.justincarmony.com/blog/2008/10/24/empowering-javascript-through-jquery/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>ASP .NET 2.0, GridViews, HyperLinkField, and JavaScript</title>
		<link>http://www.justincarmony.com/blog/2008/01/07/asp-net-20-gridviews-hyperlinkfield-and-javascript/</link>
		<comments>http://www.justincarmony.com/blog/2008/01/07/asp-net-20-gridviews-hyperlinkfield-and-javascript/#comments</comments>
		<pubDate>Tue, 08 Jan 2008 04:34:00 +0000</pubDate>
		<dc:creator>Justin Carmony</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[ASP .NET]]></category>
		<category><![CDATA[GridView]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://www.justincarmony.com/blog/2008/01/07/asp-net-20-gridviews-hyperlinkfield-and-javascript/</guid>
		<description><![CDATA[I&#8217;ve found some interesting notes on ASP .NET&#8217;s GridView, it&#8217;s limitations and work arounds. For work I was looking for a way to execute JavaScript from clicking a link on a GridView Cell. An example would be to having a list of transactions and wanting to click a link to update it&#8217;s details. I noticed ...
No related posts.]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve found some interesting notes on ASP .NET&#8217;s GridView, it&#8217;s limitations and work arounds. For work I was looking for a way to execute JavaScript from clicking a link on a GridView Cell. An example would be to having a list of transactions and wanting to click a link to update it&#8217;s details. I noticed that many functions of GridView used &lt;a&gt; tags to execute JavaScript. An example would be:</p>
<pre class="brush: xml; title: ; notranslate">
&amp;lt;a href=&quot;javascript:myFunction('variable');&quot;&amp;gt;Link&amp;lt;/a&amp;gt;
</pre>
<p>Since I had experience with the HyperLinkField before, I thought I would add a HyperLinkField to my GridView and set  the <strong>DataNavigateUrlFields</strong> to the needed fields and the DataNavigateUrlFormatString to use the fields properly. I was hoping to accomplish it by using the following code, which in turn I found out <em><font color="#ff0000"><strong>this solution does not work:</strong></font></em></p>
<p>[asp]<br />
&lt;asp:HyperLinkField DataNavigateUrlFields=&#8221;UserID,Date&#8221; DataNavigateUrlFormatString=&#8221;javascript:updatePanel(&#8216;{0}&#8217;,'{1:d}&#8217;);&#8221;<br />
HeaderText=&#8221;View&#8221; Text=&#8221;Details&#8221; /&gt;<br />
[/asp]</p>
<p>It turns out that there is a bug with the DataNavigateUrlFormatString and HyperLinkField that when trying to use javascript inside, it strips the <strong>href attribute</strong> and  leaves just a &lt;a&gt;Text&lt;/a&gt;, not giving the user a link. I found information <a href="http://forums.asp.net/p/1034007/1425058.aspx" title="ASP .NET GridView Bug" target="_blank">here at this forum post</a>. This is as of ASP .NET 2.0 and I don&#8217;t know about 3.0 or 3.5. As show in the forum post, this is the correct way to insert JavaScript into your gridview:</p>
<p>[asp]<br />
&lt;asp:TemplateField HeaderText=&#8221;Details&#8221;&gt;<br />
&lt;ItemStyle CssClass=&#8221;viewLines&#8221; /&gt;<br />
&lt;ItemTemplate&gt;<br />
&lt;a id=&#8221;user&lt;%# Eval(&#8220;userid&#8221;) %&gt;&#8221; href=&#8221;javascript:updatePanel(&#8216;&lt;%# Eval(&#8220;userid&#8221;) %&gt;&#8217;,'&lt;%# Eval(&#8220;date&#8221;) %&gt;&#8217;);&#8221;&gt;View User&lt;/a&gt;<br />
&lt;/ItemTemplate&gt;<br />
&lt;/asp:TemplateField&gt;<br />
[/asp]</p>
<p>Now, using this technique I was able to use <a href="http://jquery.com" title="jQuery Home Page">jQuery </a>to insert a row below the clicked item and add additional information.</p>
<pre class="brush: xml; title: ; notranslate">
&amp;lt;script type=&quot;text/javascript&quot;&amp;gt;
function updatePanel(user,date)
{
$('#LineItems').remove(); // remove previous entries anywhere in the grid

//  Now I got up two parents, to get to the TR tag, and I append after it another row with id's so I can identifier them easily with jQuery.
$('#tran'+tran_id).parent().parent().after('&amp;lt;tr id=&quot;LineItems&quot;&amp;gt;&amp;lt;td&amp;gt;Add. Info.&amp;lt;/td&amp;gt;&amp;lt;td colspan=\&quot;10\&quot; id=&quot;LineItemsContent&quot;&amp;gt;Getting information...&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;');
// I load the information through an ajax call
$('#LineItemsContent').load('Details.aspx?u='+user+'&amp;amp;date='+date);

}
&amp;lt;/script&amp;gt;
</pre>
<p>I hope this can help people who are struggling to figure out why their HyperLinkFields won&#8217;t work correctly with JavaScript.</p>
<p>Justin</p>
<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://www.justincarmony.com/blog/2008/01/07/asp-net-20-gridviews-hyperlinkfield-and-javascript/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Page Caching using memcached
Database Caching 20/58 queries in 0.024 seconds using memcached
Content Delivery Network via Rackspace Cloud Files: c747925.r25.cf2.rackcdn.com

Served from: www.justincarmony.com @ 2012-05-21 09:59:43 -->
