Hallo, in the following code I am trying to pass the return value of the function "getrownum" to the PHP code...but the problem is, when i am trying to pass the return value of the forementioned function, i got no result..Please help and guid me.."please find my attempts highlighted below in red"
Code:
..
...
..
var arr;
var num;

function setrownum(par)
{
 num=par;
}

function getrownum()
{
return num;
}

function cell()
	{
		var x=document.getElementById('Table2').rows[1].cells;
		alert(x[9].innerHTML);
var tableElem=document.getElementById('Table2').getElementsByTagName('tr');
		var numofRows=tableElem.length;
		alert('Your table has ' + numofRows + ' rows.');
		
 
 
		for (i = 0; i < tableElem.length; i++) {
        tableElem[i].onclick = function() {
            alert(this.rowIndex + 1);
			par=this.rowIndex+1;
			setrownum(par);
	     
	}
	alert(num);	
    }
        	alert(getrownum());}