[ PHPXref.com ] [ Generated: Sun Jul 20 19:19:23 2008 ] [ PBS Helpdesk 0.93 ]
[ Index ]     [ Variables ]     [ Functions ]     [ Classes ]     [ Constants ]     [ Statistics ]

title

Body

[close]

/ -> knowledge-ajax.html (source)

   1  <html>
   2  <head>
   3   <!--
   4      CPAINT (Cross-Platform Asynchronous INterface Toolkit) - Version 2
   5  
   6      http://cpaint.sourceforge.net
   7      
   8      released under the terms of the GPL
   9      see http://www.fsf.org/licensing/licenses/gpl.txt for details
  10  
  11      authors:  Paul Sullivan <wiley14@gmail.com>, Dominique Stender <dstender@st-webdevelopment.de>
  12      Copyright (c) 2005 Paul Sullivan, Dominique Stender - http://cpaint.sourceforge.net
  13    //-->
  14    <title>cpaint2 proxy test - google</title>
  15    <script type="text/javascript" src="../../cpaint2.inc.compressed.js"></script>
  16    <script type="text/javascript">
  17    <!--
  18      var cp = new cpaint();
  19      cp.set_response_type('text');
  20      cp.set_proxy_url('../../cpaint2_proxy.php');
  21      cp.set_use_cpaint_api(false);
  22    
  23      function ping() {
  24        cp.call('http://www.google.com/search', '', response, 'q=' + document.getElementById('query').value, 'hl=en');
  25        return false;
  26      }
  27  
  28      function response(result) {
  29        document.getElementById('response').innerHTML = result;
  30      }
  31    //-->
  32    </script>
  33  </head>
  34  <body>
  35    With CPAINT you can even perform remote requests to services that have not
  36    been implemented with CPAINT: in this example that's Google.<br />
  37    <br />
  38    The only difference is that you must not assign a cpaint remote method on call() 
  39    AND you have to provide parameter names for all arguments passed to the remote service.<br />
  40    <br />
  41    <form action="#" onSubmit="return ping()">
  42      <input type="text" id="query" value="" />
  43      <input type="submit" value="query google" />
  44    </form>
  45    <div id="response"></div>
  46  </body>
  47  </html>
  48  ##################################################################################################
  49  #################################################################################################
  50  #################################################################################################
  51  
  52  
  53  
  54  
  55  
  56  
  57  
  58  
  59  
  60  
  61  
  62  
  63  
  64  
  65  
  66  
  67  
  68  
  69  


[ Powered by PHPXref - Served by Debian GNU/Linux ]