title: simpleCart(js) Select Option Validation
body: <p>Trying to setup some validation on the add to cart button for the dropdown selections for size and color on my simplecart shelf items on my wordpress site. I can get the alert to pop and block the adding of the item, but it is wrong because the alert pops even with the proper values selected. I have been searching this for days now and have found a couple people asking the same question with no response, so any input on how and if this is possible would be amazing.</p>
  
  <p>Here is the add to cart function:</p>
  
  <pre><code>me.add = function () {
      var me=this;
      /* load cart values if not already loaded */
      if( !me.pageIsReady     ) { 
          me.initializeView(); 
          me.update();    
      }
      if( !me.isLoaded        ) { 
          me.load(); 
          me.update();    
      }
  
      var newItem = new CartItem();
  
      /* check to ensure arguments have been passed in */
      if( !arguments || arguments.length === 0 ){
          error( 'No values passed for item.');
          return;
      }
      var argumentArray = arguments;
      if( arguments[0] &amp;&amp; typeof( arguments[0] ) != 'string' &amp;&amp; typeof( arguments[0] ) != 'number'  ){ 
          argumentArray = arguments[0]; 
      } 
  
      newItem.parseValuesFromArray( argumentArray );
      newItem.checkQuantityAndPrice();
  </code></pre>
  
  <p>The code I am trying to implement:</p>
  
  <pre><code>if( item_Size = "none" ){
          alert("Please select a size");
          return;
      }
  
  
  if( item_Color = "none" ){
          alert("Please select a color");
          return;
      }
  </code></pre>
  
  <p>Now Im a noob when it comes to this stuff so Im not even sure where it stores the values so it could be any setting variable name and the code could be completely wrong but none is the value of the default select option. </p>
  
  <p>This is how it loads and saves the cookies:</p>
  
  <pre><code>me.load = function () {
      var me = this;
      /* initialize variables and items array */
      me.items = {};
      me.total = 0.00;
      me.quantity = 0;
  
      /* retrieve item data from cookie */
      if( readCookie('simpleCart') ){
          var data = unescape(readCookie('simpleCart')).split('++');
          for(var x=0, xlen=data.length;x&lt;xlen;x++){
  
              var info = data[x].split('||');
              var newItem = new CartItem();
  
              if( newItem.parseValuesFromArray( info ) ){
                  newItem.checkQuantityAndPrice();
                  /* store the new item in the cart */
                  me.items[newItem.id] = newItem;
              }
          }
      }
      me.isLoaded = true;
  };
  
  
  
  /* save cart to cookie */
  me.save = function () {
      var dataString = "";
      for( var item in this.items ){
          dataString = dataString + "++" + this.items[item].print();
      }
      createCookie('simpleCart', dataString.substring( 2 ), 30 );
  };
  </code></pre>
  
  <p>The full simpleCart code can be found here:<a href="http://www.simplecartjs.com" rel="nofollow">simplecartjs.com</a></p>
  
  <p>Any help would be greatly appreciated, I have tried other form validation techniques but am having trouble using anything meant for post validation because of the way simplecart stores variables. PLEASE HELP!!</p>
  
  <p>Thank you for you time and efforts.</p>