Here's a tricky one that no one on my other favorite javascript forums where able to answer, so maybe the expert jQuery crew knows what's going on:
My form: <html> <form id="myForm" action="functionLibrary.php?function=formSubmit"> <input type="submit" value="SEND FORM"> </form> </html> My javascript/jQuery: <script> $('#myForm').ajaxForm({ type: "POST", success: showResponse }); function showResponse(responseText, statusText) { alert(responseText); } </script> functionLibrary.php: <?php if(isset($_GET['fnc']) eval($_GET['fnc'].'();'); function formSubmit(){ echo 'form submitted.'; } ?> When ajaxForm has type= "POST", this DOES NOT work. It does not like me using a function library with POST. It DOES work when type="GET" if action="formSubmit.php" instead, then ajaxForm DOES work with EITHER POST or GET: <?php echo 'form submitted.'; ?> Why can't I use type="POST" with a function library as described in functionLibrary.php?