Problem with sendToURL(). How can I solve it?

Hi All,
I am new to flash and as3.
I have an issue with sendToURL() and navigateToURL() methods.
Here, i am placing the data present in my database into an Xml file. Again, i am parsing this xml file for accessing/retreival of data into flash using AS3's XML and XMLList classes and its methods etc.,
Collecting data from database to Xml file works fine. But, when we use navigateToURL(), a new browser window opens and required data is obtained to flash successfully.
In order to omit the new browser window, here, we are using sendToURL(). But, here, the Xml file is unable to create(not created). Hence, no data is passed from database to flash.
I also tried using URLLoader(but the same issue arises) whose code looks like this:
function createXml():void{
    var url:String = "http://localhost:8888/xmlServlet";
    var request:URLRequest = new URLRequest(url);
/*    var urlLoader:URLLoader = new URLLoader();
urlLoader.dataFormat = URLLoaderDataFormat.TEXT;
urlLoader.addEventListener(Event.COMPLETE, completeHandler1);
    trace("XML Loaded URL is"+url);
    var variables:URLVariables = new URLVariables();
    variables.viewid =String(comboBox_mc.selectedItem.data);
    //request.method=URLRequestMethod.POST;
    trace("variables.viewidvariables.viewid:"+variables.viewid);
    request.data = variables;
    //sendToURL(request);
navigateToURL(request);
//urlLoader.load(request);
/*function completeHandler1(event:Event):void {
    var loader:URLLoader = URLLoader(event.target);
    var succData:String=loader.data;
trace("in complete handler"+succData);
Please help me in this context.
Waiting for ur reply....
Thanks in advance.
Swathi.K

Hi Greg Dove,
  My requirement is that,there is button in my application when i click on it,it creates a xml file with data from the database, after that the data is loaded in the the .fla file.The code snipplet is as follows:
submitBtn_mc.addEventListener(MouseEvent.CLICK,onCheck);
function onCheck(evnt:MouseEvent):void {
var url:String = "http://localhost:8888/xmlServlet";
    var request:URLRequest = new URLRequest(url);
    var variables:URLVariables = new URLVariables();
   variables.viewid =String(comboBox_mc.selectedItem.data);
   request.data = variables;
    sendToURL(request);    //this creates an xml file
    //For loading xml file and placing in .fla
    var xmlLoader:URLLoader = new URLLoader();
    xmlLoader.load(new URLRequest("humanap.xml"));
    xmlLoader.addEventListener(Event.COMPLETE, LoadXML);
    trace("values from xml are");
    function LoadXML(event:Event):void {
        var xmlData:XML = new XML();
        var xmlList:XMLList;
        xmlData = XML(event.target.data);
        xmlList = xmlData.children();
Here sendToURL(request); is not working.It is going to the serverside script but not creating the xml file.When i use navigateToURL(request); its working fine.PLEASE HELP ME...................
Thanks in advance
Swathi

Similar Messages

Maybe you are looking for

  • My mac keeps crashing EVERYTIME I restart

    Ive just had fibre installed and now my Mac mini keeps crashing within minutes of me restarting, even in safe mode. I can't even try to resolve this without it freezing!!

  • CRM Communication structure not working in a copy client

    Hi all, my issue is the following. In client 300 CRM, defined as copy of client 100 communication structure CRMT_ACS_I_COM  is not filled by implementation of BADI CRM_COND_COM_BADI . Basically it is supposed that once you fill manually a field conta

  • Publish to Android device doesn't work

    Flash CS6 - I'm trying to Publish content to Android device to install and open it there, I receive error everytime I try that says your phone is connected. First question cross my mind, why does it assume I have a Phone ? I connected ASUS Android 4.

  • User moved Quality inspection stock from sloc 290 to 295 via Migo_tr(311)

    Issue -User moved Quality inspection stock from storage location 290 to 295 (no Quality) via Migo_TR(311) Now they want the "Q" status to be reflected under storage location 295 ,pls help how it can be done. Background- RMA processing was correctly p

  • DnD file in native explorer with deferred download

    Hi community, I am trying to provide functionality to drag and drop a file from our application to native explorer. It is pretty easy to do this if the file is present in the source folder to which the transferrable data points. But the problem is th