title: Javascript parseInt not working on a string, trying to get an integer from an HTML value
body: <p>I am making a basic game, and I have a tile system that I'm using.  Each tile has an ID of "tileX", where X is a number (ex. tile1).  I have a function as follows:</p>
  
  <pre><code>window.onclick = function() {
      var x = event.clientX, y = event.clientY,
      elementMouseIsOver = document.elementFromPoint(x, y).id;
      document.getElementById("tileTell").value = elementMouseIsOver;
      console.log(elementMouseIsOver);
      console.log(typeof(elementMouseIsOver));
      elementMouseIsOver = parseInt(elementMouseIsOver);
      console.log(elementMouseIsOver);
      console.log(typeof(elementMouseIsOver));
  }
  </code></pre>
  
  <p>Line 4 of code there fills in an input field so I can visually see which tile I've clicked (I'm using this to make sure things are working properly and so I can find the tiles I need).  That works fine.  On line 5 when I do a <code>console.log</code>, it gives me the proper ID, and verifies that it is a <code>string</code>.</p>
  
  <p>After that I want to reset the <code>elementMouseIsOver</code> variable to be an integer, so if the ID was <code>tile1</code> I would expect the new result to be <code>1</code>.  But when I look at it in the console, I get <code>NaN</code>.  And then when I check the type of it immediately after that, I get <code>number</code>.</p>
  
  <p>The <code>parseInt</code> does not seem to be working properly, what am I doing wrong?  I need to use the ID names of each tile for mathematical operations so this is vital to my game.  I know it's probably a really dumb mistake but I am completely at a loss...</p>