Send text message to a Php server : Php « Development « Flex

Home
Flex
1.Chart
2.Components
3.Container
4.Data Model
5.Development
6.Effects
7.Event
8.Graphics
9.Grid
10.Style
Flex » Development » PhpScreenshots 
Send text message to a Php server
Send text message to a Php server
         

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical">
  <mx:Script>
    
    import mx.rpc.events.ResultEvent;
    import mx.rpc.http.HTTPService;
    private function onKeyDownevent:KeyboardEvent void {
      if event.keyCode == Keyboard.ENTER ) {
        var url:String = "http://localhost/add.php?user="+escape(user.text)+"&message="+escape(msg.text);
        var htMessages:HTTPService = new HTTPService();
        htMessages.url = url;
        htMessages.send();
        msg.text = '';
      }
    }
  </mx:Script>
  <mx:Form width="100%">
    <mx:FormItem label="User name" width="100%">
      <mx:TextInput id="user" width="100%" text="Jack" />
    </mx:FormItem>
    <mx:FormItem label="Message" width="100%">
      <mx:TextInput id="msg" width="100%" keyDown="onKeyDown(event);" />
    </mx:FormItem>
  </mx:Form>
</mx:Application>

   
    
    
    
    
    
    
    
    
  
Related examples in the same category
1.Read text message from Php serverRead text message from Php server
2.Call Php pageCall Php page
w___ww___._j__a___v___a___2__s__.___c__o__m__ | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.