I have successfully integrated PayPal Express into a Flex application. In DoExpressCheckoutPayment.php, I have the following JavaScript line of code that will not execute:
window.opener.window.document.getElementById('index').paymentComplete();
'index' - http://mysite.com/index.html# contains index.swf 'paymentComplete()' - the function that finishes processing the transaction
Has anyone successfully activated callback methods back from a popup to a Flex application using JavaScript?
Thank you in advance for any help,
Orville
SWFAddress将是一个非常好的解决方案。
In Flex, the address in URLRequest was absolute ( http://mysite.com/phpfolder/ ) and not relative (/phpfolder) to the SWF. For some reason JavaScript requires the relative URL for the following line to work. I am not sure why.
window.opener.window.document.getElementById('index').paymentComplete();
如果您可以在包含flex应用程序的html页面中使弹出窗口调用JS方法,则可以使用ExternalInterface
类的addCallBack方法使该JS方法与flex应用程序通信。
对于getElementById,请使用OBJECT标签中的EMBED标签中的ID。而不是OBJECT标签本身中的ID!
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.