Basically using xajax “You can directly call php functions from your javascript code”

Xajax will do the rest.
For example, if you are going to write a javascript function Capitalize which captilaze your textbox content when you press a button.

Here is the pure html/javascript code for that:

=============================================



==============================================

Now see the difference when we use xajax, we can write this Capitalize function in php code and can call from javascript.

function Capitalize($value)

{

$objResponse = new xajaxResponse();

$objResponse->assign(“update”,”innerHTML”,strtoupper($value));

return $objResponse;

}

and you can call from your button’s onclick function:

onclick=”xajax_Capitalize(document.getElementById(‘cap’).value)”

Here the same functionality we moved from client to server. Thus the point is you can simply call all the functions you written in php (Server Side) from javascript code via onClick, onMouseOver or window.onLoad etc.

You can get the full source code of Capitalize example here:

http://www.sajithmr.com/downloads/capitalize.zip

To download and for documentation go:
http://xajaxproject.org/

Thanks

Sajith