Hello,
1) I have a php script A with several buttons(not submit) on a form.
2) On click of any of the buttons, a specific javascript function is called.
3) Depending on the outcome of the javascript function, a second php script, (set in the action property of the form) B is called with the document.forms[0].submit() function.
Problem: Javascript correctly references script B. However, I cannot reference any of the $_POST values. They are practically empty.
If however, I make the buttons submit buttons, everything works out just fine. But I need to use the javascript approach, because even though all the buttons reference the same script B, they do so under entirely different conditions.
Thank you.
1) I have a php script A with several buttons(not submit) on a form.
2) On click of any of the buttons, a specific javascript function is called.
3) Depending on the outcome of the javascript function, a second php script, (set in the action property of the form) B is called with the document.forms[0].submit() function.
Problem: Javascript correctly references script B. However, I cannot reference any of the $_POST values. They are practically empty.
If however, I make the buttons submit buttons, everything works out just fine. But I need to use the javascript approach, because even though all the buttons reference the same script B, they do so under entirely different conditions.
Thank you.
Comment