[英]Sending data in a call from flex to javascript
I have implemented a export to excel feature for my flex datagrid. 我已经为我的flex数据网格实现了Excel导出功能。 The export functionality is done from backend, so I send a
urlRequest
using ExternalInterface
.call like ExternalInterface.call("window.open", urlRequest.url ....)
. 导出功能是从后端完成的,所以我使用
ExternalInterface
.call像ExternalInterface.call("window.open", urlRequest.url ....)
一样发送urlRequest
。 I understand its a GET call right now. 我现在知道它是GET电话。
Now I need to POST some data as a part of this urlRequest. 现在,我需要发布一些数据作为urlRequest的一部分。 How can I achieve that (may be using urlVariable).
我如何实现这一目标(可能正在使用urlVariable)。 Please remember I need to open that "Open/Save" dialog window as per current implementation only.
请记住,仅根据当前实现,我需要打开该“打开/保存”对话框窗口。
Call a function in javascript which will make a POST request. 在javascript中调用一个函数,该函数会发出POST请求。 Use ExternalInterface.call to send parameters to that javascript function.
使用ExternalInterface.call将参数发送到该javascript函数。
Try with 试试看
ExternalInterface.call("javascriptMethodname", your data);
put the same method name in your html file 在您的html文件中放入相同的方法名称
function javascriptMethodname(mydata){....... }
在此处查看示例实用程序: 通过浏览器控制台记录调试消息
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.