Then in the JavaScript function, set the action attribute of form as -
Code:
function saveData() {
// logic for validating form data etc.
// if all successful
{
MyForm.action = "save.php";
MyForm.method = "POST";
MyForm.submit();
return true;
}
return false;
}
function closePage() {
MyForm.action = "close.php";
MyForm.method = "POST";
MyForm.submit();
return true;
}
Hope it helps you out...
Regards,
Niral Soni[/QUOTE]
I need some clarification on the above code
can I use as below in the above function
PHP Code:
MyForm.action = "save.php?xyz=<?echo $xyz;?>";