hi i want to pass a javascript variable to php function in the same page.In the head of my page i have this javascript code
<script type="text/javascript">
function getTableRow() {
var userSelect;
if (!document.getElementsByTagName || !document.createTextNode) return;
var rows = document.getElementById('products_table').getElementsByTagName('tbody')[0].getElementsByTagName('tr');
for (i = 0; i < rows.length; i++) {
rows[i].onclick = function() {
userSelect = this.rowIndex;
}
}
}
</script>
and in the body i call a php function and i want to pass as argument the javascript variable userSelect.
<body>
<p><?php table_from_xml(javascript variable); ?>
</p>
</body>
Is impossible to do that without reload the page?