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 Link to comment https://forums.phpfreaks.com/topic/44693-total-noob-question-re-forms/ 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> Link to comment https://forums.phpfreaks.com/topic/44693-total-noob-question-re-forms/#findComment-217053 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.