title: Javascript Leading Zero Function Argument
body: <p>I am scratching my head over a problem that I am having with one of my JavaScript functions.</p>
  
  <p>I have the following code:</p>
  
  <pre><code> function getdetails(id) 
  {
  $('#details').load('load.php?id='+id);
  }
  </code></pre>
  
  <p>The issue with this is, the id often starts with a leading zero or a series of leading zero's, which means they get cut off. I understand that it's treating it as an octet which is fine. </p>
  
  <p>So I try to add the following</p>
  
  <pre><code>function getdetails(id) 
  {
  var id = parseInt(id,10);
  $('#details').load('load.php?id='+id);
  }
  </code></pre>
  
  <p>This however still cuts off the zero's. I have seen some of the padding functions that people have suggested, but for one I can not predict how many zero's there will and as far as I can tell, the zero's get removed as soon as it gets passed through as an argument.</p>
  
  <p>Any suggestion on how I can solve this problem?</p>