How to assign the value of a javascript variable to a php variable
<p>I've a form. </p>

<pre><code>&lt;form action="inc/genxml.php" method="post"&gt;
      &lt;input id="nameTxt" name="name" type="text" value="test"/&gt;
      &lt;button id="nameSave" class="left"&gt;Save&lt;/button&gt;
&lt;/form&gt;
</code></pre>

<p>And a div element #name</p>

<p>When I click the save button, I want to pass the position of the div #name to the form action file.
To get the position, I'm using jQuery .position().</p>

<p>Something like below. (which just prints out the coordinates)</p>

<pre><code>$('#nameSave').click(
    function() {
        var pos = $('#name').position();
        alert("left: " + pos.left + ", top: " + pos.top );
    }
);
</code></pre>

<p>I want to pass the coordinate values (pos.left &amp; post.top) to the form action file (in this case to the file genxml.php).</p>

<p>How should I do that?</p>
