PHP Classes

File: example.php

Recommend this page to a friend!
  Classes of Er. Rochak Chauhan   Simple AJAX   example.php   Download  
File: example.php
Role: Example script
Content type: text/plain
Description: Example Script
Class: Simple AJAX
Execute server side actions without page reloading
Author: By
Last change:
Date: 18 years ago
Size: 443 bytes
 

Contents

Class file image Download
<?php
   
/**
     * Example file
     */
   
   
$paramNames = array('name', 'email', 'phone');
                           
   
$paramValues = array('Rochak Chauhan', 'rochakchauhan@gmail.com', '100');
   
    require_once(
'ajax.inc.php');
   
$ajax = new Ajax('displayResponse');
   
/*
        // without parametes
        $ajax->sendRequest('serverfile.php');
    */
   
$ajax->sendRequest('serverfile.php', $paramNames, $paramValues);
?>
<span id="displayResponse">No response...</span>