Topic: full form process documentation

I am new on xajax, and I have problems make it works, does any one can provide a full example on form processing or full documentation of it.

thanks for you patiente

regards

ncr

Re: full form process documentation

Hi,

Click "xajax docs & tutorials" entry at the top of this page. There is a section on form processing that should help you get going.

Ed

If you ever stop learning you may as well dig a hole, crawl in and pull the top over yourself.

Re: full form process documentation

I already did, but it looks like documetation is not according new version, I had type exactly how it says but no success.
I can not read elements of the form. it always receive an empty value.

any help.

Re: full form process documentation

Okay,

Try this example:

<?php
/*
    Simple Form Handling Example.
*/
require_once("xajax/xajax_core/xajax.inc.php"); 
$xajax = new xajax(); 
$xajax->configure('javascript URI', 'xajax/');                                                    

function test($dta='')
{
    $resp=new xajaxResponse();
    $resp->alert(print_r($dta,true));
    return $resp; 
}
//$xajax->configure('debug',true);
$xajax->register(XAJAX_FUNCTION,"test"); 
$xajax->processRequest(); 
?>
<html>
<head>
<? $xajax->printJavascript(); ?>
<title>test</title>
<style>
label{
    font-weight: bold;
    width: 150px;
    text-align: right;
}
</style>
</head>
<body>
<form id='form1'>
<fieldset>
<label>Name:</label><input id="myname" name="myname"/><br/>
<label>Address:</label><input id="myaddress" name="myaddress"/>
</fieldset>
</form>
<input type="button" value="Send Form" onclick="xajax_test(xajax.getFormValues('form1'))"/>
</body>
</html>

The idea is that the getFormValues() function gathers the values of all of the form inputs and
sends them as an array to the server.

Hope this clears things up... smile

Ed

If you ever stop learning you may as well dig a hole, crawl in and pull the top over yourself.