<?xml version="1.0" encoding="ISO-8859-1"?>

<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/">
	<channel>
		<title>ASP Message Board - JavaScript/JScript</title>
		<link>http://www.aspmessageboard.com/</link>
		<description>Ask all JavaScript/JScript questions in this forum!</description>
		<language>en</language>
		<lastBuildDate>Thu, 23 May 2013 16:30:34 GMT</lastBuildDate>
		<generator>vBulletin</generator>
		<ttl>60</ttl>
		<image>
			<url>http://www.aspmessageboard.com/images/misc/rss.png</url>
			<title>ASP Message Board - JavaScript/JScript</title>
			<link>http://www.aspmessageboard.com/</link>
		</image>
		<item>
			<title>Adding new validation to radio button validation code</title>
			<link>http://www.aspmessageboard.com/showthread.php?237599-Adding-new-validation-to-radio-button-validation-code&amp;goto=newpost</link>
			<pubDate>Thu, 23 May 2013 15:32:28 GMT</pubDate>
			<description><![CDATA[I have code in place that does its job that an entry 'must' be made on each set of radio buttons. Either Yes or No. 
 
However, people are 'required'...]]></description>
			<content:encoded><![CDATA[<div>I have code in place that does its job that an entry 'must' be made on each set of radio buttons. Either Yes or No.<br />
<br />
However, people are 'required' to enter yes on at least one of them and this validation doesn't check for that.<br />
It 'will' allow people to check 'no' for all three sets'. I need it to know that they are checking at least one of the 'yes' selections.  If anyone has advice on what needs to be added i'd appreciate the point in the right direction!<br />
<br />
Here is the javascript...<br />
<br />
<div class="bbcode_container">
	<div class="bbcode_description">Code:</div>
	<hr /><code class="bbcode_code">function RadioValidator()<br />
{<br />
&nbsp; &nbsp; var ShowAlert = '';<br />
&nbsp; &nbsp; var AllFormElements = window.document.getElementById(&quot;form1&quot;).elements;<br />
&nbsp; &nbsp; for (i = 0; i &lt; AllFormElements.length; i++) <br />
&nbsp; &nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; if (AllFormElements[i].type == 'radio') <br />
&nbsp; &nbsp; &nbsp; &nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var ThisRadio = AllFormElements[i].name;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var ThisChecked = 'No';<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var AllRadioOptions = document.getElementsByName(ThisRadio);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; for (x = 0; x &lt; AllRadioOptions.length; x++)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  if (AllRadioOptions[x].checked &amp;&amp; ThisChecked == 'No')<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  ThisChecked = 'Yes';<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  break;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  } <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }&nbsp;  <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var AlreadySearched = ShowAlert.indexOf (ThisRadio);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (ThisChecked == 'No' &amp;&amp; AlreadySearched == -1)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ShowAlert = ShowAlert + ThisRadio + 'at least one must be answered\n';<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }&nbsp; &nbsp;  <br />
&nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; }<br />
&nbsp; &nbsp; if (ShowAlert != '')<br />
&nbsp; &nbsp; {<br />
&nbsp; &nbsp; alert(ShowAlert);<br />
&nbsp; &nbsp; return false;<br />
&nbsp; &nbsp; }<br />
&nbsp; &nbsp; else<br />
&nbsp; &nbsp; {<br />
&nbsp; &nbsp; return true;<br />
&nbsp; &nbsp; }<br />
}</code><hr />
</div> Here is the code in the yes/no radio buttons...<br />
<br />
<div class="bbcode_container">
	<div class="bbcode_description">HTML Code:</div>
	<hr /><code class="bbcode_code"><span style="color:#000080">&lt;div class=<span style="color:#0000FF">&quot;radio&quot;</span>&gt;</span><br />
&nbsp; &nbsp; <span style="color:#000080">&lt;span class=<span style="color:#0000FF">&quot;label&quot;</span>&gt;</span>I am a this?<span style="color:#000080">&lt;/span&gt;</span><br />
&nbsp; &nbsp; <span style="color:#000080">&lt;div id=<span style="color:#0000FF">&quot;reason1&quot;</span>&gt;</span><span style="color:#FF8000">&lt;label&gt;</span><span style="color:#FF8000">&lt;input type=<span style="color:#0000FF">&quot;radio&quot;</span> name=<span style="color:#0000FF">&quot;This?&quot;</span> id=<span style="color:#0000FF">&quot;reason1&quot;</span> value=<span style="color:#0000FF">&quot;Yes&quot;</span> onclick=<span style="color:#0000FF">&quot;document.getElementById('divUrl1').style.display='block'&quot;</span>&gt;</span>Yes<span style="color:#FF8000">&lt;/label&gt;</span><br />
&nbsp; &nbsp; <span style="color:#FF8000">&lt;label&gt;</span><span style="color:#FF8000">&lt;input type=<span style="color:#0000FF">&quot;radio&quot;</span> name=<span style="color:#0000FF">&quot;This?&quot;</span> id=<span style="color:#0000FF">&quot;reason1&quot;</span> value=<span style="color:#0000FF">&quot;No&quot;</span> onclick=<span style="color:#0000FF">&quot;document.getElementById('divUrl1').style.display='none'&quot;</span>&gt;</span> No<span style="color:#FF8000">&lt;/label&gt;</span><span style="color:#000080">&lt;/div&gt;</span><br />
<span style="color:#000080">&lt;/div&gt;</span><br />
<br />
<span style="color:#000080">&lt;div class=<span style="color:#0000FF">&quot;radio&quot;</span>&gt;</span><br />
&nbsp; &nbsp; <span style="color:#000080">&lt;span class=<span style="color:#0000FF">&quot;label&quot;</span>&gt;</span>That?<span style="color:#000080">&lt;/span&gt;</span><br />
&nbsp; &nbsp; <span style="color:#000080">&lt;div id=<span style="color:#0000FF">&quot;reason2&quot;</span>&gt;</span><span style="color:#FF8000">&lt;label&gt;</span><span style="color:#FF8000">&lt;input type=<span style="color:#0000FF">&quot;radio&quot;</span> name=<span style="color:#0000FF">&quot;That?&quot;</span> id=<span style="color:#0000FF">&quot;reason2&quot;</span> value=<span style="color:#0000FF">&quot;Yes&quot;</span> onclick=<span style="color:#0000FF">&quot;document.getElementById('divUrl2').style.display='block'&quot;</span>&gt;</span> Yes<span style="color:#FF8000">&lt;/label&gt;</span><span style="color:#FF8000">&lt;label&gt;</span><span style="color:#FF8000">&lt;input type=<span style="color:#0000FF">&quot;radio&quot;</span> name=<span style="color:#0000FF">&quot;That?&quot;</span> id=<span style="color:#0000FF">&quot;reason2&quot;</span> value=<span style="color:#0000FF">&quot;No&quot;</span> onclick=<span style="color:#0000FF">&quot;document.getElementById('divUrl2').style.display='none'&quot;</span>&gt;</span> No<span style="color:#FF8000">&lt;/label&gt;</span><span style="color:#000080">&lt;/div&gt;</span><br />
<span style="color:#000080">&lt;/div&gt;</span><br />
<br />
<span style="color:#000080">&lt;div class=<span style="color:#0000FF">&quot;radio&quot;</span>&gt;</span><br />
&nbsp; &nbsp; <span style="color:#000080">&lt;span class=<span style="color:#0000FF">&quot;label&quot;</span>&gt;</span>I am the other?<span style="color:#000080">&lt;/span&gt;</span><br />
&nbsp; &nbsp; <span style="color:#000080">&lt;div id=<span style="color:#0000FF">&quot;reason3&quot;</span>&gt;</span><span style="color:#FF8000">&lt;label&gt;</span><span style="color:#FF8000">&lt;input type=<span style="color:#0000FF">&quot;radio&quot;</span> name=<span style="color:#0000FF">&quot;theother?&quot;</span> id=<span style="color:#0000FF">&quot;reason3&quot;</span> value=<span style="color:#0000FF">&quot;Yes&quot;</span> onclick=<span style="color:#0000FF">&quot;document.getElementById('divUrl3').style.display='block'&quot;</span>&gt;</span> Yes<span style="color:#FF8000">&lt;/label&gt;</span><span style="color:#FF8000">&lt;label&gt;</span><span style="color:#FF8000">&lt;input type=<span style="color:#0000FF">&quot;radio&quot;</span> name=<span style="color:#0000FF">&quot;theother?&quot;</span> id=<span style="color:#0000FF">&quot;reason3&quot;</span> value=<span style="color:#0000FF">&quot;No&quot;</span> onclick=<span style="color:#0000FF">&quot;document.getElementById('divUrl3').style.display='none'&quot;</span>&gt;</span> No<span style="color:#FF8000">&lt;/label&gt;</span><span style="color:#000080">&lt;/div&gt;</span><br />
<span style="color:#000080">&lt;/div&gt;</span></code><hr />
</div> <br />
thank you in advance for any advice/input you can provide!<br />
<br />
iiSwanSongii</div>

 ]]></content:encoded>
			<category domain="http://www.aspmessageboard.com/forumdisplay.php?11-JavaScript-JScript">JavaScript/JScript</category>
			<dc:creator>iiswansongiiAtWork</dc:creator>
			<guid isPermaLink="true">http://www.aspmessageboard.com/showthread.php?237599-Adding-new-validation-to-radio-button-validation-code</guid>
		</item>
		<item>
			<title>ajaxtoolkit progress update javascript</title>
			<link>http://www.aspmessageboard.com/showthread.php?237569-ajaxtoolkit-progress-update-javascript&amp;goto=newpost</link>
			<pubDate>Wed, 01 May 2013 21:38:31 GMT</pubDate>
			<description><![CDATA[I am using ajaxtoolkit modalpopupextender to display a processing message. It's working fine on a typical postback (button click, etc). 
 
However, I...]]></description>
			<content:encoded><![CDATA[<div>I am using ajaxtoolkit modalpopupextender to display a processing message. It's working fine on a typical postback (button click, etc).<br />
<br />
However, I am calling a postback in javascript and the progress message isn't showing UNLESS I add an &quot;alert&quot; in the javascript.<br />
<br />
<b>Here's my javascript<b></b>:</b><br />
<div class="bbcode_container">
	<div class="bbcode_description">Code:</div>
	<hr /><code class="bbcode_code">function getOrder() {<br />
&nbsp; &nbsp; beginRequest('', '')<br />
&nbsp; &nbsp; var hid = document.getElementById(&quot;ctl00_ContentPlaceHolder_hid&quot;);<br />
&nbsp; &nbsp; //alert(hid.value);<br />
<br />
&nbsp; &nbsp; __doPostBack(&quot;SaveOrder&quot;, hid.value);<br />
&nbsp; &nbsp; endRequest('', '')<br />
}</code><hr />
</div> I obviously don't want to have an &quot;alert&quot; so does anyone have a solution or ran into this?<br />
<br />
Here's the other piece of javascript used relating to this (typical stuff):<br />
<div class="bbcode_container">
	<div class="bbcode_description">Code:</div>
	<hr /><code class="bbcode_code">Sys.WebForms.PageRequestManager.getInstance().add_beginRequest(beginRequest);<br />
Sys.WebForms.PageRequestManager.getInstance().add_endRequest(endRequest);&nbsp; &nbsp; <br />
<br />
var mdlCtl = document.getElementById('ctl00_hfModalCtlID').value;<br />
<br />
function beginRequest(sender, args){<br />
&nbsp; &nbsp; $find(mdlCtl).show();<br />
}<br />
<br />
function endRequest(sender, args) {<br />
&nbsp; &nbsp; $find(mdlCtl).hide();<br />
}</code><hr />
</div> I'm stumped on why the &quot;alert&quot; makes a difference in the javascript that shows the processing message...?<br />
<br />
Thoughts? Ideas? I can post more code if needed.</div>

 ]]></content:encoded>
			<category domain="http://www.aspmessageboard.com/forumdisplay.php?11-JavaScript-JScript">JavaScript/JScript</category>
			<dc:creator>kylemac</dc:creator>
			<guid isPermaLink="true">http://www.aspmessageboard.com/showthread.php?237569-ajaxtoolkit-progress-update-javascript</guid>
		</item>
		<item>
			<title>Part two of my task</title>
			<link>http://www.aspmessageboard.com/showthread.php?237559-Part-two-of-my-task&amp;goto=newpost</link>
			<pubDate>Tue, 30 Apr 2013 19:41:32 GMT</pubDate>
			<description>Bill helped me trememdously with part one of my task which was to present users with search options. 
 
In part one, users can enter an item into a...</description>
			<content:encoded><![CDATA[<div>Bill helped me trememdously with part one of my task which was to present users with search options.<br />
<br />
In part one, users can enter an item into a search box. If results are too many, they can narrow the search by using search options by checking appropriate checkboxes.<br />
<br />
I truly grateful for his immense, generous help.<br />
<br />
Now, I am working on part two.<br />
<br />
In this part two, We have a search form which allows users to search for items on the page.<br />
<br />
There is also another form with checkboxes that allows users to refine their searches with the hope of reducing the number of search results as alluded to above.<br />
<br />
For instance, if I enter McCland on the search box and 13 results marching McCland are returned, I can click on Advanced search Options and a bunch of checkboxes are rendered.<br />
<br />
I can then check &quot;Street&quot;, &quot;Road&quot;, &quot;LandMarks&quot;, etc. I can then click search on McCland again.<br />
<br />
This time, only addresses with Street or Road or LandMarks will be displayed if available.<br />
<br />
This works great.<br />
<br />
Then there is a <b>Remember This Action</b> icon.<br />
<br />
My biggest challenge so far is to allow users to click on this <b>Remember This Action</b> icon and save their current results.<br />
<br />
This way, next time they visit the page, the results they searched for previously are presented to them unless they choose to search with another option.<br />
<br />
If they click on this <b>Remember This Action</b> icon, they will be prompted with a message explaining that they are about to save their current Results.<br />
<br />
They can click Yes to save current results so that next time they visit the page, they can use their saved results or they can click Cancel to not save.<br />
<br />
I suspect this will be done with cookies(jquery or Javascriot) but I am not sure how to do this.<br />
<br />
Any assistance is greatly appreciated.</div>

 ]]></content:encoded>
			<category domain="http://www.aspmessageboard.com/forumdisplay.php?11-JavaScript-JScript">JavaScript/JScript</category>
			<dc:creator>IheChi</dc:creator>
			<guid isPermaLink="true">http://www.aspmessageboard.com/showthread.php?237559-Part-two-of-my-task</guid>
		</item>
		<item>
			<title>Help needed with simple Javascript array</title>
			<link>http://www.aspmessageboard.com/showthread.php?237553-Help-needed-with-simple-Javascript-array&amp;goto=newpost</link>
			<pubDate>Wed, 24 Apr 2013 16:31:21 GMT</pubDate>
			<description>Hey guys, 
 
JS has never been my stronger point, so Im after a bit of help with this bit of code. 
 
I have an auto suggest field that is populated...</description>
			<content:encoded><![CDATA[<div>Hey guys,<br />
<br />
JS has never been my stronger point, so Im after a bit of help with this bit of code.<br />
<br />
I have an auto suggest field that is populated by user input. When the user has made their final selection, they click on a button to &quot;verify&quot; this input.<br />
<br />
In simple terms, here's what might be displayed in the auto suggest field upon user selection.<br />
<br />
INALA, Queensland 4077;<br />
<br />
...and then how its passed over to the verification popup window.<br />
<br />
suburb=INALA%2C%20Queensland%204077%3B<br />
 <br />
I need to somehow split this up so I get each value separately.<br />
<br />
eg<br />
<br />
suburb - INALA<br />
state - Queensland<br />
pcode - 4077<br />
<br />
Here's the existing snippet of JS that captures the user input.<br />
<br />
var suburb = fixField(form.search.value,0,&quot;suburb&quot;);<br />
<br />
Thanks!</div>

 ]]></content:encoded>
			<category domain="http://www.aspmessageboard.com/forumdisplay.php?11-JavaScript-JScript">JavaScript/JScript</category>
			<dc:creator>late_nights_and_sore_eyes</dc:creator>
			<guid isPermaLink="true">http://www.aspmessageboard.com/showthread.php?237553-Help-needed-with-simple-Javascript-array</guid>
		</item>
	</channel>
</rss>
