Send information from javascript to php file
<p>I have this function <code>onEdit()</code> and now I want to send the value of variable id to a php file (let's call it <code>test.php</code>) so that using that value I can auto fill the popup called <code>modtemplate</code> which is located in <code>test.php</code> file.</p>

<p>Is there any way to accomplish this?</p>

<p>Any help on this will be greatly appreciated!</p>

<pre><code>function onEdit() {
    var checkboxs = document.getElementsByTagName("input");

    var id='';
    for (var b=0; b&lt;checkboxs.length; b++) {
        if( (checkboxs[b].type == "checkbox") &amp;&amp; (checkboxs[b].checked) )  {
            id = checkboxs[b].value;
                    break;
            }
    }

    if(!id)
        alert("Please select a record to edit");
    else    
        document.getElementById('modtemplate').style.visibility = 'visible';

}
</code></pre>
