I have this function onEdit()
and now I want to send the value of variable id to a php file (let's call it test.php
) so that using that value I can auto fill the popup called modtemplate
which is located in test.php
file.
Is there any way to accomplish this?
Any help on this will be greatly appreciated!
function onEdit() {
var checkboxs = document.getElementsByTagName("input");
var id='';
for (var b=0; b<checkboxs.length; b++) {
if( (checkboxs[b].type == "checkbox") && (checkboxs[b].checked) ) {
id = checkboxs[b].value;
break;
}
}
if(!id)
alert("Please select a record to edit");
else
document.getElementById('modtemplate').style.visibility = 'visible';
}