Hi there, I am passing hidden value, and getting it into javascript function. I want to pass this value to another page. Before passing when i print it, it gives me [object HTMLInputElement]
$var4 = 1;
echo "<input type='hidden' id='var4' value='$var4'>";
and accessing it in javascript
var y = document.getElementById('var4');
document.write(y); //[object HTMLInputElement]
it gives me output as [object HTMLInputElement] instead of 1
Another thing is that I want to pass this value to data.php
".... data.php?q="+y)
is this write, can i pass value like this? Would you suggest me any solution. Thanks in advance.