Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/react-native/7.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Apache flex 保存/导航到文件问题_Apache Flex_Flex3 - Fatal编程技术网

Apache flex 保存/导航到文件问题

Apache flex 保存/导航到文件问题,apache-flex,flex3,Apache Flex,Flex3,单击按钮时,我正在向服务器发送请求: private function submitButtonClicked():void { var variables:URLVariables = new URLVariables(); variables.table = tableInput.text; var u:URLRequest=new URLRequest("http://sasajkl");

单击按钮时,我正在向服务器发送请求:

private function submitButtonClicked():void
        {
            var variables:URLVariables = new URLVariables(); 
            variables.table = tableInput.text;
            var u:URLRequest=new URLRequest("http://sasajkl");
            u.data = variables;
            u.method = URLRequestMethod.POST;
            var loader:URLLoader=new URLLoader();
            loader.addEventListener(Event.COMPLETE,preparingCompleted);
            loader.load(u);
        }
来自服务器的响应实际上是一个URL地址,因此我的事件处理程序是:

private function preparingCompleted(event:Event):void
        {
            var request:URLRequest=new URLRequest(event.target.data);
            navigateToURL(request);
        }
它过去可以工作,但现在由于,它不再在Chrome中工作了。我试图使用
fileReference.download(请求,“Report.xls”)
,但随后我收到一条错误消息,因为该函数不是作为对用户操作(如单击按钮)的响应调用的

有人知道如何从服务器上获取的URL地址访问该文件吗? 谢谢。

这是您自己的工作:

ExternalInterface.call("window.open",url);

为什么不呢?你有错误吗?还是什么都没发生?该页面上列出了一些其他解决方案;但我抓到的那个看起来是最简单的。