Get Element ID and passing into function
<p>I'm using javascript to get my element id value. But out of 3, one of my element id does not parse in. It gives me [object HTMLInputElement] while the rest of element id values can work.</p>

<p>Sample Code:</p>

<pre><code>&lt;?php 
$Name = "Johnnnny";
echo "&lt;input type=\"hidden\" name=\"Name\" id=\"Name\" value=\"$Name\"/&gt;";
?&gt;
 &lt;script&gt;
  var ID= document.getElementById('ID').value; //this works.
  var Name = document.getElementById('Name').value; //give me [object HTMLInputElement]
 &lt;/script&gt;
</code></pre>

<p>Kindly advise. It should be able to get the ElementID of 'Name'.value </p>
