<?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: Populating dropdowns</title>
	<atom:link href="http://assuredynamics.com/index.php/portfolio/populating-dropdowns/feed/" rel="self" type="application/rss+xml" />
	<link>http://assuredynamics.com/index.php/portfolio/populating-dropdowns/</link>
	<description>Dynamic solutions</description>
	<lastBuildDate>Mon, 16 Feb 2015 00:02:53 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
	<item>
		<title>By: NiallODonovan</title>
		<link>http://assuredynamics.com/index.php/portfolio/populating-dropdowns/#comment-891</link>
		<dc:creator>NiallODonovan</dc:creator>
		<pubDate>Wed, 04 Jul 2012 08:25:30 +0000</pubDate>
		<guid isPermaLink="false">http://www.assuredynamics.com/?post_type=portfolio&#038;p=969#comment-891</guid>
		<description>MB, 

If you have a look at the click event of the checkboxes, you will see a section of script that deals with this:

&lt;strong&gt;// Check to see if the user has already selected
// from this option in the dropdown
var vChoice = userSelection.rawValue.search(/fruit/);
if (vChoice !== -1) {
	userSelection.rawValue = null; 
}&lt;/strong&gt;

This searches the rawValue of the dropdown, looking for the criteria. If the search matches the criteria, it returns the index. If it does not match, it returns -1. This is why I am testing in the if statement for the search !== -1, which would mean that the user has selected a choice that matches the criteria and therefore we much clear the dropdown. 

The easiest approach for you is to include this script in the &lt;strong&gt;exit event of the first/static dropdown&lt;/strong&gt;:

&lt;strong&gt;list2.rawValue = null; &lt;/strong&gt;

This will always null the second/dynamic dropdown, every time the user exits the first dropdown.  

You can use the more detailed script block as a basis for a more refined solution, which will take into account your data structure. 

Hope that helps,

Niall</description>
		<content:encoded><![CDATA[<p>MB, </p>
<p>If you have a look at the click event of the checkboxes, you will see a section of script that deals with this:</p>
<p><strong>// Check to see if the user has already selected<br />
// from this option in the dropdown<br />
var vChoice = userSelection.rawValue.search(/fruit/);<br />
if (vChoice !== -1) {<br />
	userSelection.rawValue = null;<br />
}</strong></p>
<p>This searches the rawValue of the dropdown, looking for the criteria. If the search matches the criteria, it returns the index. If it does not match, it returns -1. This is why I am testing in the if statement for the search !== -1, which would mean that the user has selected a choice that matches the criteria and therefore we much clear the dropdown. </p>
<p>The easiest approach for you is to include this script in the <strong>exit event of the first/static dropdown</strong>:</p>
<p><strong>list2.rawValue = null; </strong></p>
<p>This will always null the second/dynamic dropdown, every time the user exits the first dropdown.  </p>
<p>You can use the more detailed script block as a basis for a more refined solution, which will take into account your data structure. </p>
<p>Hope that helps,</p>
<p>Niall</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: MB</title>
		<link>http://assuredynamics.com/index.php/portfolio/populating-dropdowns/#comment-890</link>
		<dc:creator>MB</dc:creator>
		<pubDate>Wed, 04 Jul 2012 07:58:36 +0000</pubDate>
		<guid isPermaLink="false">http://www.assuredynamics.com/?post_type=portfolio&#038;p=969#comment-890</guid>
		<description>Hi, thanx for the info. Been quite helpful in what I need to accomplish as well. One thing I&#039;m battling with is as follows. I use two dropdown lists. list1 one got static data for selection and then list2 get populated based on list1 selection. This works 100% with the preOpen event.

What I need to do now is, when the value change in list1 the info in list2 gets cleared. Currently there is only two values to choose from, but the list will expand as time goes. 

So I suppose I need to use the change event but how to clear the value?

Regards,</description>
		<content:encoded><![CDATA[<p>Hi, thanx for the info. Been quite helpful in what I need to accomplish as well. One thing I&#8217;m battling with is as follows. I use two dropdown lists. list1 one got static data for selection and then list2 get populated based on list1 selection. This works 100% with the preOpen event.</p>
<p>What I need to do now is, when the value change in list1 the info in list2 gets cleared. Currently there is only two values to choose from, but the list will expand as time goes. </p>
<p>So I suppose I need to use the change event but how to clear the value?</p>
<p>Regards,</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: NiallODonovan</title>
		<link>http://assuredynamics.com/index.php/portfolio/populating-dropdowns/#comment-849</link>
		<dc:creator>NiallODonovan</dc:creator>
		<pubDate>Fri, 08 Jun 2012 09:42:31 +0000</pubDate>
		<guid isPermaLink="false">http://www.assuredynamics.com/?post_type=portfolio&#038;p=969#comment-849</guid>
		<description>Jim,

I have amended  the script in the click event of the checkboxes to address this issue. 

Hope that helps,

Niall</description>
		<content:encoded><![CDATA[<p>Jim,</p>
<p>I have amended  the script in the click event of the checkboxes to address this issue. </p>
<p>Hope that helps,</p>
<p>Niall</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jim</title>
		<link>http://assuredynamics.com/index.php/portfolio/populating-dropdowns/#comment-848</link>
		<dc:creator>Jim</dc:creator>
		<pubDate>Wed, 06 Jun 2012 16:17:02 +0000</pubDate>
		<guid isPermaLink="false">http://www.assuredynamics.com/?post_type=portfolio&#038;p=969#comment-848</guid>
		<description>The code works great....just what I wanted to do.  The only issue with my application is that I would like to remove the dropdown choice if the checkbox is unchecked.  The current code will allow &quot;apples&quot; to stay the dropdown choice if fruit is unchecked.  Thanks for the help.</description>
		<content:encoded><![CDATA[<p>The code works great&#8230;.just what I wanted to do.  The only issue with my application is that I would like to remove the dropdown choice if the checkbox is unchecked.  The current code will allow &#8220;apples&#8221; to stay the dropdown choice if fruit is unchecked.  Thanks for the help.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
