• Home
  • New Entries
  • Popular Entries
  • Submit a Story
  • About

PHP for Microsoft Ajax Library ...

    The Microsoft AJAX Library is a pure-JavaScript library that is used by ASP.NET AJAX but is also available as a separate download. Because it is pure JavaScript, it is not tied to ASP.NET on the backend. PHP for MS AJAX is code to help you make use of the Microsoft AJAX Library from PHP applications. With this first Alpha release, it simply supports exposing PHP classes as AJAX-enabled web services, just as in ASP.NET applications. In fact, the generated proxies are identical to what you get from ASP.NET, meaning you can have full interoperability.

Hello World

The service on the backend so to speak:
PLAIN TEXT
HTML:


   1.
      
   2.
      <?php
   3.
      
   4.
      require_once ../../dist/MSAjaxService.php;
   5.
      
   6.
      class HelloService extends MSAjaxService
   7.
      {
   8.
          function SayHello($name)
   9.
          {
  10.
              return "Hello, " . $name . "!";
  11.
          }
  12.
      }
  13.
      
  14.
      $h = new HelloService();
  15.
      $h->ProcessRequest();
  16.
      

And the front end that will talk to it:
PLAIN TEXT
HTML:


   1.
      
   2.
      <html>
   3.
      <head>
   4.
      <title>Hello, World!</title>
   5.
      <script type="text/javascript" src="../../MicrosoftAjaxLibrary/MicrosoftAjax.js"></script>
   6.
      <script type="text/javascript" src="HelloService.php/js"></script>
   7.
      </head>
   8.
      <body>
   9.
      Name: <input id="name" type="text" />
  10.
      <input type="button" value="Say Hello" onclick="button_click(); return false;" />
  11.
      <br />
  12.
      Response from server: <span id="response"></span>
  13.
      </body>
  14.
      <script type="text/javascript">
  15.
          function button_click() {
  16.
              HelloService.SayHello($get( ame).value, function (result) {
  17.
                  $get( aresponse).innerHTML = result;
  18.
              });
  19.
          }
  20.
      </script>
  21.
      </html>
  22.
source: ajaxian

 Original Source:

AddThis Social Bookmark Button

Posted at 09:07:35 am | Permalink | Posted in .Net  

Related Stuff

  • MooV: Using cutting edge Video phones and Software Video Phones - coupling all that with VoIP and empowering the disabled.

  • Moo Telecom: VoIP communications made easy - Ring anyway with the fun and ease of using a normal phone

  • TagR:Mobile Social Network with Real Time Locations Based services, and Ambience Intelligence, VoiP, IM, Skype, Googletalk, Mapping, Flickr, Events, Calendaring, Scheduling, SecondLife Support

  • ClearSMS : ClearSMS is a Web-based application that lets you send bulk SMS messages to your customers, contacts, or just about anyone.

  • Jajah:jah is a VoIP (Voice over IP) provider, founded by Austrians Roman Scharf and Daniel Mattes in 2005[1]. The Jajah headquarters are located in Mountain View, CA, USA, and Luxembourg. Jajah maintains a development centre in Israel.

  • Skype: It’s free to download and free to call other people on Skype. Skype the number one voice over ip software

  • PrivatePhone: a free local phone number with voicemail and messages you can check online or from any phone.

Top Stuff

MessengerFX

e-messenger

ILoveIM

Top 20 Ruby CMS

eBuddy

MSN Web Messenger



About Ajaxlines

Ajaxlines is a project focused on providing its audience with a database of most of Ajax related articles, resources, tutorials and services from around the world.

Its purpose is to showcase the power of Ajax and to act as a portal to the Ajax development community.


Search


Topics

  • .Net (164)
  • Ajax (82)
  • Ajax Games (10)
  • Articles (95)
  • Bookmarking (35)
  • Calendar (20)
  • Chat (45)
  • ColdFusion (3)
  • CSS (75)
  • Email (23)
  • Facebook (83)
  • Flash (19)
  • Google (54)
  • Html (27)
  • Image (11)
  • International Calls & VOIP (7)
  • Java (54)
  • Javascript (265)
  • jQuery (159)
  • JSON (61)
  • Perl (2)
  • PHP (156)
  • Presentation (19)
  • Python (3)
  • Resources (2)
  • RSS (8)
  • Ruby (31)
  • Storage (4)
  • Toolkits (103)
  • Tutorials (217)
  • UI (11)
  • Utilities (174)
  • Web2.0 (18)
  • XmlHttpRequest (28)
  • YUI (12)

© 2006 www.ajaxlines.com. All Rights Reserved. Powered by IRange