donwilly2010 opened a new issue #3125: Load External JavaScript into Weex on 
Android
URL: https://github.com/apache/incubator-weex/issues/3125
 
 
   Makes sure these boxes are checked befor submitting your issue - thank you!
   
   [Yes] If you encounter any problems using the tool, please check if there 
has a new version to update(Run weex update [pluginname]@latest).
   [Yes] Check the FAQ, make sure there have not the same issue.
   
   
   Weex is a fantastic Framework for Mobile development. But I need help while 
trying to load an external javascript page. this page will also need some 
parameters from props/data.
   This is required for payment integration such as loading a paypal card 
payment page into weex.
   
   I tried using the following but it didnt work on Weex on Android:
   
   var document=weex.document;
   
   method: {
   loadPaymentPanel(){
   var body = document.createElement('div', {
   classStyle: { alignItems: 'center' }
   })
   
                   var  script = document.createElement('script', {
                       attr: { src: 'url of payment gateway' },
                       classStyle: { alignItems: 'center'}
                   })
   body.appendChild(script)
   document.documentElement.appendChild(body)
   
   paymentOptions = {
   amount : 2000,
   user: "mark",
   email: "[email protected],
   }
   
   var window = document.getElementById(script).contentWindow
   
    var handler = window.PaymentPop.setup(paymentOptions)
               if (!this.embed) {
                   handler.openIframe()
               }
   }
   
   }
   
   *I got error the createElement is not a function.
   
   *Please how else can I achieve what I want??

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to