sycosyco123 Posted March 28, 2007 Share Posted March 28, 2007 I'm feeling dummer than a brick so would appreciate some help here. Could someone show me a really simple Xajax example of a text input a submit button the data entered into the form echo on the sane page. Thanks Quote Link to comment Share on other sites More sharing options...
sycosyco123 Posted March 28, 2007 Author Share Posted March 28, 2007 finally got it. $xajax = new xajax(); function processForm($aFormData) { $objResponse = new xajaxResponse(); $sOut = "Name: ".$aFormData['name']; $objResponse->addAssign("theform", "innerHTML", $sOut); return $objResponse; } $xajax->registerFunction('processForm'); $xajax->processRequests(); ?> <html> <head> <? $xajax->printJavascript(); ?> </head> <body> <div id="theform"> <form id="myform" method="post"> <td>Name:</td><td><input autocomplete="off" type="text" class="textbox" name="name" id="name" /></td> <td> </td><td><input type="button" class="button" value="Submmit" onclick="xajax_processForm(xajax.getFormValues('myform'));"/></td> </tr> </table> </form> </div> Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.