>
Tutorials:Learn xajax in 10 Minutes
Welcome, Guest

by NeerajRawat on Thursday, 13 November 2008
Tutorials:Learn xajax in 10 Minutes


Using xajax in a PHP script xajax is designed to be extremely easy to implement in both existing web applications as well as new projects. You can add the power of xajax to nearly any PHP script in seven easy steps: 1. Include the xajax class library: require_once("xajax.inc.php"); 2. Instantiate the xajax object: $xajax = new xajax(); 3. Register the names of the PHP functions you want to be able to call through xajax: $xajax->registerFunction("myFunction"); 4. Write the PHP functions you have registered and use the xajaxResponse object to return XML commands from them: function myFunction($arg) { // do some stuff based on $arg like query data from a database and // put it into a variable like $newContent // Instantiate the xajaxResponse object $objResponse = new xajaxResponse(); // add a command to the response to assign the innerHTML attribute of // the element with id="SomeElementId" to whatever the new content is $objResponse->addAssign("SomeElementId","innerHTML", $newContent); //return the xajaxResponse object return $objResponse; } 5. Before your script sends any output, have xajax handle any requests: $xajax->processRequests(); 6. Between your tags, tell xajax to generate the necessary JavaScript: printJavascript(); ?> 7. Call the function from a JavaScript event or function in your application (you must change SomeArgument into a real variable, a string, etc.--some argument is required): That's it. xajax takes care of most everything else. Your biggest task is writing the PHP functions and returning xajax XML responses from them-- which is made extremely easy by the xajaxResponse class. reference link http://xajaxproject.org/wiki/Tutorials:Learn_xajax_in_10_Minutes



Blogger Image
My Blog Title

Product Engineering, software engineering company, Product Development, Product Migration, Product Re-engineering, Product Maintenance, Product Testing Commercial Application Development, Business Software development, commercial software for startups, Application Support and Maintenance, software testing Product Maintenance, Outsource product maintenance, product support and maintenance Product Migration, Product Re-engineering, product re-engineering services Product Research, Product Engineering, UI Prototyping Services Software Testing Services, Quality Assurance services, professional software testers, Load Testing, Functional Testing, Cross Platform, Browser Testing, Test Automation, Testing Tools, software quality analysis Functional Testing Services, software quality analysis, Software Testing Services, Application Testing Services, Functional Testing Types Automated Testing, Automated Testing Services, automation testing, test script development, Automation Test Tools, outsource automation testing Load Testing, Performance Testing Services, Load Testing Tools Offshore Software Development, Outsource software services, offshore outsourcing services, offshore software development services, IT outsourcing services, software quality assurance services, Offshore IT services, Custom Application Development Services, Offshore Product Engineering Benefits of IT Outsourcing, Offshore Software Development companies, offshore software development firms Outsource planning, IT outsourcing, IT development services, offshore IT companies, offshore software development Offshore Software Development, Outsource software services, offshore outsourcing services, offshore software development services, IT outsourcing services, software quality assurance services, Offshore IT services, Custom Application Development Services, Offshore Product Engineering Offshore Software Development, Outsource software services, offshore outsourcing services, offshore software development services, IT outsourcing services, software quality assurance services, Offshore IT services, Custom Application Development Services, Offshore Product Engineering