<?xml version="1.0" encoding="utf-8" ?><rss version="2.0" xml:base="https://www.webmaster-forums.net/crss/node/1015738" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title></title>
    <link>https://www.webmaster-forums.net/crss/node/1015738</link>
    <description></description>
    <language>en</language>
          <item>
    <title></title>
    <link>https://www.webmaster-forums.net/html-css-and-javascript/basic-javascript#comment-1091407</link>
    <description> &lt;p&gt;Thank you very much.&lt;/p&gt;
&lt;p&gt;That all makes sense and I will be using it more than just for this application.&lt;/p&gt;
&lt;p&gt;Thanks again for your help.&lt;/p&gt;
 </description>
     <pubDate>Thu, 11 Oct 2001 16:22:46 +0000</pubDate>
 <dc:creator>artsapimp</dc:creator>
 <guid isPermaLink="false">comment 1091407 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/html-css-and-javascript/basic-javascript#comment-1091404</link>
    <description> &lt;p&gt;Hi artsapimp,&lt;/p&gt;
&lt;p&gt;Why (box ? 1 : 0)? What does that mean?&lt;br /&gt;
 (condition) ? true : false;&lt;br /&gt;
if the condition passes, execute the true (between ? and : ) else execute the false (after the : )&lt;/p&gt;
&lt;p&gt;...the syntax. How does that translate?&lt;br /&gt;
since checkboxes are &#039;checked&#039;, the checked value is either true or false (on or off)&lt;/p&gt;
&lt;p&gt;Can you at any time check for a true/false statement like you did with the ? and the : seperating each value? &lt;/p&gt;
&lt;p&gt;yes.&lt;/p&gt;
&lt;p&gt;How many values can you use between the :s?&lt;br /&gt;
theoritically, unlimited.  However, you run the risk of confusing the browser, not to mention the programmer.&lt;/p&gt;
&lt;p&gt;(browser == netscape) ? ( (version == &#039;4.7&#039;)? (document.layers) : (document.getElementById) ) : ( (version &amp;lt; &#039;5.5&#039;) ? (document.all) : (document.getElementById) )&lt;/p&gt;
&lt;p&gt;BTW here&#039;s another solution to your original problem:&lt;/p&gt;
&lt;p&gt;and more in flavor with radio buttons:&lt;/p&gt;
&lt;p&gt;Vinny&lt;/p&gt;
 </description>
     <pubDate>Thu, 11 Oct 2001 15:43:16 +0000</pubDate>
 <dc:creator>Vincent Puglia</dc:creator>
 <guid isPermaLink="false">comment 1091404 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/html-css-and-javascript/basic-javascript#comment-1091355</link>
    <description> &lt;p&gt;Thank you very much.&lt;/p&gt;
&lt;p&gt;I don&#039;t really understand what it&#039;s doing in the function and was hoping you could help me understand it a little.&lt;/p&gt;
&lt;p&gt;Why (box ? 1 : 0)?  What does that mean?&lt;br /&gt;
I&#039;m assuming what is the value of the box (1 being on, 0 being off) but I don&#039;t understand the syntax.  How does that translate?&lt;/p&gt;
&lt;p&gt;While typing this I understood the rest of it.&lt;/p&gt;
&lt;p&gt;Can you at any time check for a true/false statement like you did with the ? and the : seperating each value?  How many values can you use between the :s?&lt;/p&gt;
&lt;p&gt;Thanks for your help.&lt;/p&gt;
 </description>
     <pubDate>Wed, 10 Oct 2001 20:11:31 +0000</pubDate>
 <dc:creator>artsapimp</dc:creator>
 <guid isPermaLink="false">comment 1091355 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/html-css-and-javascript/basic-javascript#comment-1091294</link>
    <description> &lt;p&gt;on form submission you could do a simple check to see whether both are checked or not, then prompt the user to select only 1 option........&lt;/p&gt;
&lt;p&gt;otherwise this script might do the trick. I have commented out an alert which would be optional. It groups two checkboxes together and only allows one to be checked. You can have other checkboxes as well, which wont be affected by the script...&lt;/p&gt;
&lt;p&gt;&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;&lt;span style=&quot;color: #000000&quot;&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;&amp;lt;?php&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;&amp;lt;!&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;DOCTYPE HTML &lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;PUBLIC \&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&quot;-//W3C//DTD HTML 4.0 Transitional//EN\&quot;&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;html&amp;gt;&lt;br /&gt;&amp;lt;HEAD&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;amp;lt;script LANGUAGE=\&quot;JavaScript\&quot;&amp;amp;gt;&lt;br /&gt;function countChoices(obj) {&lt;br /&gt;max = 1; // max. number allowed at a time&lt;br /&gt;&lt;br /&gt;box1 = obj.form.box1.checked;&amp;nbsp; // your checkboxes here&lt;br /&gt;box2 = obj.form.box2.checked;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;count = (box1 ? 1 : 0) + (box2 ? 1 : 0) ;&lt;br /&gt;// If you have more checkboxes on your form&lt;br /&gt;// add more&amp;nbsp; (box_ ? 1 : 0)&amp;nbsp; &#039;s separated by &#039;+&#039;&lt;br /&gt;&lt;br /&gt;if (count &amp;gt; max) {&lt;br /&gt;// alert(\&quot;you can only choose one of these two boxes\&quot;)&lt;br /&gt;obj.checked = false;&lt;br /&gt;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&amp;amp;lt;/script&amp;amp;gt;&lt;br /&gt;&amp;lt;/HEAD&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;BODY&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;center&amp;gt;&lt;br /&gt;&amp;lt;form&amp;gt;&lt;br /&gt;Please choose up to 2 sections:&lt;br /&gt;&amp;lt;p&amp;gt;&lt;br /&gt;&amp;lt;input type=checkbox name=box1 onClick=\&quot;countChoices(this)\&quot;&amp;gt;Section 1&lt;br /&gt;&amp;lt;p&amp;gt;&lt;br /&gt;&amp;lt;input type=checkbox name=box2 onClick=\&quot;countChoices(this)\&quot;&amp;gt;Section 2&lt;br /&gt;&amp;lt;p&amp;gt;&lt;br /&gt;please not you can only select 1 of the above two options&lt;br /&gt;&amp;lt;p&amp;gt;&lt;br /&gt;&amp;lt;input type=checkbox name=another1 &amp;gt;Section 3&lt;br /&gt;&amp;lt;p&amp;gt;&lt;br /&gt;&amp;lt;input type=checkbox name=another2 &amp;gt;Section 4&lt;br /&gt;&amp;lt;p&amp;gt;&lt;br /&gt;&amp;lt;input type=checkbox name=another3 &amp;gt;Section 5&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;p&amp;gt;&lt;br /&gt;&amp;lt;/form&amp;gt;&lt;br /&gt;&amp;lt;/center&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;/body&amp;gt;&lt;br /&gt;&amp;lt;/html&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;this part of the code always gets chopped off...&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;?&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;&lt;/p&gt;
 </description>
     <pubDate>Wed, 10 Oct 2001 03:34:43 +0000</pubDate>
 <dc:creator>detox</dc:creator>
 <guid isPermaLink="false">comment 1091294 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/html-css-and-javascript/basic-javascript#comment-1091274</link>
    <description> &lt;p&gt;Thank you, but that did not do the trick.&lt;/p&gt;
&lt;p&gt;When I applied that it just acts like there is nothing associated with onClick.&lt;/p&gt;
 </description>
     <pubDate>Tue, 09 Oct 2001 17:45:41 +0000</pubDate>
 <dc:creator>artsapimp</dc:creator>
 <guid isPermaLink="false">comment 1091274 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/html-css-and-javascript/basic-javascript#comment-1091273</link>
    <description> &lt;p&gt;I&#039;m not a JS guy, but here is my untested guess..&lt;br /&gt;
&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;&amp;lt;input	type=&amp;quot;Checkbox&amp;quot;&lt;br /&gt;	name=&amp;quot;Option1&amp;quot;&lt;br /&gt;	onClick=&amp;quot;document.forms.Troubleshooting.Option2.value=&amp;#039;&amp;#039;;&amp;quot;&amp;gt;&lt;/code&gt;&lt;/div&gt;&#039;&lt;br /&gt;
Good Luck,&lt;/p&gt;
 </description>
     <pubDate>Tue, 09 Oct 2001 17:27:08 +0000</pubDate>
 <dc:creator>Mark Hensler</dc:creator>
 <guid isPermaLink="false">comment 1091273 at https://www.webmaster-forums.net</guid>
  </item>
  </channel>
</rss>
