ammm...I have this code

<table border="1" name="myTable" id="myTable">
$nRow = $_GET['rowLength'];
$nColumn = 7;
    echo "<TR>";
        echo "<TD><INPUT TYPE='text' NAME='' VALUE=''/></TD>";
    echo "</TR>";

now, I'm trying to pass js variable to php variable on the same page....
but I'm having this error: Undefined index: rowLength

...I'm using $_GET to get the variable rowLength from js...
...thank you in advance...


Can you rewrite your js function so that the only thing left is to call that function. If so, you can do it like my example below. Not a big one, but that's how you make the php call for the output of the js function. unless, you want to wrap the entire js as php variable, then the possiblility is a little bit brighter. However, passing it in the script like your script above will not do it, because PHP is parse on the server side, while js is interacting on the client side.

echo "hello! I am echoed by php <br/>";

<script type="text/javascript">
function displayDate()

<p>Javascript ouput delivered by php </p>
<p id="out">Echoed JS function shows here.</p>

<button type="button" onclick="<?php echo 'displayDate()';?>">Clikc Me</button>


thank you for the reply veedeoo...