Reply
Highlighted
Member
Posts: 9
Registered: ‎02-07-2012

How to call PopUp from controller or javascript not by click in CIM?

Hi guys,

 

In Rails framework, I need to call the lightbox to add payment method by using AuthorizeNetPopup.openAddPaymentPopup(). But based on the design, the popup should be triggered by other ways not by clicking the normal button.

For example, users click "signup" button, the server side can generate ProfileID, Token, and send the Token to page, but right now how can I automatically tirgger the AuthorizeNetPopup.openAddPaymentPopup() method to open the popup?

If I can refer to Ajax, but how can I call the above method in .js file?

 

I appreciate any idea or suggestion!!! Thank you very much in advance!!!

 

Best!

Administrator
Posts: 591
Registered: ‎08-21-2009

Re: How to call PopUp from controller or javascript not by click in CIM?

I'm afraid that I'm not that familiar with the specific details of Ruby, but basic javascript can be added to the "onload" attribute for your page body.  Most javascript toolkits also have built in functionality that makes it easy to run functions when the page has completed loading.