<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: Improving my jQuery</title>
	<atom:link href="http://www.stuffbysarah.net/2008/07/24/improving-my-jquery/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.stuffbysarah.net/2008/07/24/improving-my-jquery/</link>
	<description>PHP, WordPress and Business Ramblings</description>
	<lastBuildDate>Sat, 28 Aug 2010 15:58:26 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
	<item>
		<title>By: Sarah</title>
		<link>http://www.stuffbysarah.net/2008/07/24/improving-my-jquery/#comment-14880</link>
		<dc:creator>Sarah</dc:creator>
		<pubDate>Fri, 25 Jul 2008 18:19:25 +0000</pubDate>
		<guid isPermaLink="false">http://www.stuffbysarah.net/?p=762#comment-14880</guid>
		<description>Si I know the feeling. I have so many personal projects half finished, books half read, magazines not even looked at. Client work seems to be taking over my life right now, and when it isn&#039;t all I want to do is escape the house (where I reside 24 hours a day most of the time!).

But yes, the book, so far, has been great :)</description>
		<content:encoded><![CDATA[<p>Si I know the feeling. I have so many personal projects half finished, books half read, magazines not even looked at. Client work seems to be taking over my life right now, and when it isn&#039;t all I want to do is escape the house (where I reside 24 hours a day most of the time!).</p>
<p>But yes, the book, so far, has been great <img src='http://www.stuffbysarah.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Si Philp</title>
		<link>http://www.stuffbysarah.net/2008/07/24/improving-my-jquery/#comment-14879</link>
		<dc:creator>Si Philp</dc:creator>
		<pubDate>Fri, 25 Jul 2008 18:15:24 +0000</pubDate>
		<guid isPermaLink="false">http://www.stuffbysarah.net/?p=762#comment-14879</guid>
		<description>Hi Sarah,
I have to admit I have finished the book either due to opensource project commitments, real life and normal work.  Am glad you&#039;re enjoying the book though. :)</description>
		<content:encoded><![CDATA[<p>Hi Sarah,<br />
I have to admit I have finished the book either due to opensource project commitments, real life and normal work.  Am glad you&#039;re enjoying the book though. <img src='http://www.stuffbysarah.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sarah</title>
		<link>http://www.stuffbysarah.net/2008/07/24/improving-my-jquery/#comment-14878</link>
		<dc:creator>Sarah</dc:creator>
		<pubDate>Fri, 25 Jul 2008 16:58:52 +0000</pubDate>
		<guid isPermaLink="false">http://www.stuffbysarah.net/?p=762#comment-14878</guid>
		<description>Finally got the form to work using submit() and a bit of trickery. I&#039;ll write up about it in the morning. I have an admin section to finish first!

Cheers to Sam and Marc for their input :)</description>
		<content:encoded><![CDATA[<p>Finally got the form to work using submit() and a bit of trickery. I&#039;ll write up about it in the morning. I have an admin section to finish first!</p>
<p>Cheers to Sam and Marc for their input <img src='http://www.stuffbysarah.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sarah</title>
		<link>http://www.stuffbysarah.net/2008/07/24/improving-my-jquery/#comment-14877</link>
		<dc:creator>Sarah</dc:creator>
		<pubDate>Fri, 25 Jul 2008 16:11:50 +0000</pubDate>
		<guid isPermaLink="false">http://www.stuffbysarah.net/?p=762#comment-14877</guid>
		<description>Update - looks like onsubmit and return false don&#039;t play well together as it works fine if I use the click() function. Now I just have to work out how to do it all dynamically!</description>
		<content:encoded><![CDATA[<p>Update &#8211; looks like onsubmit and return false don&#039;t play well together as it works fine if I use the click() function. Now I just have to work out how to do it all dynamically!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sarah</title>
		<link>http://www.stuffbysarah.net/2008/07/24/improving-my-jquery/#comment-14873</link>
		<dc:creator>Sarah</dc:creator>
		<pubDate>Fri, 25 Jul 2008 14:21:45 +0000</pubDate>
		<guid isPermaLink="false">http://www.stuffbysarah.net/?p=762#comment-14873</guid>
		<description>Marc my apologies. I&#039;ve just worked out what the problem was after comparing your code to mine. The first option in my parent list has

&lt;code&gt;&lt;option value=&quot;&quot;&gt;Select a Parent&lt;/option&gt;&lt;/code&gt;

and that&#039;s what was coming up as undefined and subsequently killing the function.

Your code does indeed work perfectly. I can&#039;t believe I&#039;ve just lost the entire morning to an empty value!

Thank you so much for the code. I&#039;d have never worked it out otherwise!</description>
		<content:encoded><![CDATA[<p>Marc my apologies. I&#039;ve just worked out what the problem was after comparing your code to mine. The first option in my parent list has</p>
<p><code>&lt;option value=""&gt;Select a Parent&lt;/option&gt;</code></p>
<p>and that&#039;s what was coming up as undefined and subsequently killing the function.</p>
<p>Your code does indeed work perfectly. I can&#039;t believe I&#039;ve just lost the entire morning to an empty value!</p>
<p>Thank you so much for the code. I&#039;d have never worked it out otherwise!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Marc Grabanski</title>
		<link>http://www.stuffbysarah.net/2008/07/24/improving-my-jquery/#comment-14872</link>
		<dc:creator>Marc Grabanski</dc:creator>
		<pubDate>Fri, 25 Jul 2008 14:02:32 +0000</pubDate>
		<guid isPermaLink="false">http://www.stuffbysarah.net/?p=762#comment-14872</guid>
		<description>The first code works, I tested it.. which is a solution based on exactly how you described what you wanted to do it. Here is the full paste: &lt;a href=&quot;http://bin.cakephp.org/view/1174030172&quot;&gt;Reset Select Lists based on Select with Ids&lt;/a&gt;

If you want to get the prefix selector working then make a button with id=&quot;reset&quot; then run this code:
&lt;code&gt;$(&quot;#reset&quot;).click(function(){
	$(&#039;select[id^=child]&#039;).each(function(i,select){
		$(select)[0].selectedIndex = 0;
	});
});&lt;/code&gt;

On #2, if return false isn&#039;t working then an error occurred in your code. Watch firebug carefully as you submit the form.</description>
		<content:encoded><![CDATA[<p>The first code works, I tested it.. which is a solution based on exactly how you described what you wanted to do it. Here is the full paste: <a href="http://bin.cakephp.org/view/1174030172" class="external">Reset Select Lists based on Select with Ids</a></p>
<p>If you want to get the prefix selector working then make a button with id=&#034;reset&#034; then run this code:<br />
<code>$("#reset").click(function(){<br />
	$('select[id^=child]').each(function(i,select){<br />
		$(select)[0].selectedIndex = 0;<br />
	});<br />
});</code></p>
<p>On #2, if return false isn&#039;t working then an error occurred in your code. Watch firebug carefully as you submit the form.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sam</title>
		<link>http://www.stuffbysarah.net/2008/07/24/improving-my-jquery/#comment-14871</link>
		<dc:creator>Sam</dc:creator>
		<pubDate>Fri, 25 Jul 2008 13:57:48 +0000</pubDate>
		<guid isPermaLink="false">http://www.stuffbysarah.net/?p=762#comment-14871</guid>
		<description>Have you tried:

$(&quot;select[id*=child]&quot;).selectedIndex = 0;

?</description>
		<content:encoded><![CDATA[<p>Have you tried:</p>
<p>$(&#034;select[id*=child]&#034;).selectedIndex = 0;</p>
<p>?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sarah</title>
		<link>http://www.stuffbysarah.net/2008/07/24/improving-my-jquery/#comment-14870</link>
		<dc:creator>Sarah</dc:creator>
		<pubDate>Fri, 25 Jul 2008 13:56:31 +0000</pubDate>
		<guid isPermaLink="false">http://www.stuffbysarah.net/?p=762#comment-14870</guid>
		<description>Sam, I tried it without too. It didn&#039;t do anything at that point.</description>
		<content:encoded><![CDATA[<p>Sam, I tried it without too. It didn&#039;t do anything at that point.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sam</title>
		<link>http://www.stuffbysarah.net/2008/07/24/improving-my-jquery/#comment-14869</link>
		<dc:creator>Sam</dc:creator>
		<pubDate>Fri, 25 Jul 2008 13:07:17 +0000</pubDate>
		<guid isPermaLink="false">http://www.stuffbysarah.net/?p=762#comment-14869</guid>
		<description>take out the [0] which is limiting your results to the first one

hth

Sam</description>
		<content:encoded><![CDATA[<p>take out the [0] which is limiting your results to the first one</p>
<p>hth</p>
<p>Sam</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sarah</title>
		<link>http://www.stuffbysarah.net/2008/07/24/improving-my-jquery/#comment-14868</link>
		<dc:creator>Sarah</dc:creator>
		<pubDate>Fri, 25 Jul 2008 13:02:20 +0000</pubDate>
		<guid isPermaLink="false">http://www.stuffbysarah.net/?p=762#comment-14868</guid>
		<description>Change that, the one liner fix for point 1 only does the first select list not all 6 :(

Back to trying to get the each function to work.</description>
		<content:encoded><![CDATA[<p>Change that, the one liner fix for point 1 only does the first select list not all 6 <img src='http://www.stuffbysarah.net/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> </p>
<p>Back to trying to get the each function to work.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
