View Single Post
Old 02-04-2013, 12:47 PM   PM User | #3
nani_nisha06
Regular Coder

 
Join Date: Oct 2012
Location: mother land --india
Posts: 159
Thanks: 37
Thanked 2 Times in 2 Posts
nani_nisha06 is an unknown quantity at this point
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;?>";
nani_nisha06 is offline   Reply With Quote