title: Uncaught TypeError: Cannot read property 'substr' of undefined
body: <p>Pardon me for not being clear, but have thia script that is really long. When I have it live, I get this error in Chrome's Console.</p>
  
  <blockquote>
    <p>Uncaught TypeError: Cannot read property 'substr' of undefined </p>
  </blockquote>
  
  <p>here is the snippet of code where it is reading from.</p>
  
  <pre><code>var formIddd = $('select[class~="FormField"]').get(numSelec).name.substr($('select[class~="FormField"]').get(numSelec).name.length-3,2);
  </code></pre>
  
  <p>I looked up substr on google and it appears to be a known property. I also found the classes. I have played with the lengths, but still getting stuck. It used to work until BigCommerce did an update. </p>
  
  <p>Any advice much appreciated, cheers.</p>