I've seen several posts for this but haven't seen any kind of 
resolution.  I've seen other posts that say it is extremely easy.

Well, I'm in the same boat: I can't seem to get post data to send to 
my IIS server.  I have been able to use the exact same .asp file on 
the server side and javascript in an IE window to get the correct 
results.  When I try it from Flex...no data.

Here is my code:

Flex code:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"; 
layout="absolute" creationComplete="test()">
        <mx:Script>
                <![CDATA[
                
                import mx.rpc.events.ResultEvent;
                import mx.controls.Alert;
                
                private function test():void{
                HttpRequest.addEventListener("result", testResponse);
                HttpRequest.url = "http://IIS_Server/AJAX/test.asp";;
                HttpRequest.resultFormat = "text";
                HttpRequest.method = "POST";
                HttpRequest.contentType = "application/x-www-form-
urlencoded";
                HttpRequest.request = "myString=TestString";
                HttpRequest.send();
        }
        
        private function testResponse(event: ResultEvent):void{
                Alert.show(event.result.toString());
        }
        ]]>
        </mx:Script>
        
        <mx:HTTPService id="HttpRequest" showBusyCursor="true" />
</mx:Application>


ASP Code (pretty simple stuff..):
<%@ Language=VBScript %>
<%
Response.Write "here it is: '" & Request.Form & "'"
Response.End
%>

This should return the entire post.  The only thing I get back in 
Flex is the string "here it is: ''".  As mentioned above, when I use 
the below javascript and Microsoft's 'XMLHttpRequest' object, I get 
a successfull post and receive the string "here it 
is: 'myString=StringTest'" back to the browser.



Thanks in advance for any help!!

Bruce






--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/flexcoders/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:[EMAIL PROTECTED] 
    mailto:[EMAIL PROTECTED]

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to