PHP Classes

File: tests/client.php

Recommend this page to a friend!
  Classes of Guilherme Blanco  >  pAjax  >  tests/client.php  >  Download  
File: tests/client.php
Role: Example script
Content type: text/plain
Description: Client Script for URI test
Class: pAjax
Do RPC calls from the browser without page reloads
Author: By
Last change: Updated content
Date: 17 years ago
Size: 1,091 bytes


Class file image Download

require_once "../class.pAjax.php";

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"

<html xmlns="" lang="en" xml:lang="en">
        <title>Server Info retriever</title>
        <?php pAjax::showJavaScript(".."); ?>
<script type="text/javascript">
              function Server() {

              var _p = Server.prototype = new pAjax;

              _p.getInfo = function () {
                  var oRequest = this.prepare("test", pAjaxRequest.POST);

              _p.onLoad = function () {
                var data = this.getResponse();

                for (var item in data)
                    alert(item + " = " + data[item]);

        <input type="button" name="check" value="Get Server Info"
            onclick="(new Server()).getInfo(); return false;">