How do I limit the number of selected option tags within a select tag in jQuery and javascript?
<p>I am trying to use jQuery to limit the number of selected option tags in jQuery to 100.  What am I doing wrong?  The select tag looks like this:</p>

<pre>
&lt;select name="order"&gt;
&lt;option value="1" selected&gt;Order Name&lt;/option&gt; ...
</pre>

<p>after a user selects one or more option tags...  Still not sure how to get the event handler to work.</p>

<pre>
var countSelectedOptionTags
$("select[name='order']").change(function() {
  $("select[name='order']").children('attr="selected"').each(function() {
     countSelectedOptionTags++;
  });
  if countSelectedOptionTags > 100 
  {
     alert("You can not select more than 100 option tag.");
     return;

  }   //I need the option tags that have the selected attribute

</pre>
