PluginsDeposit Action → Documentation
Preview
Documentation
This plugin allows you to display a pop-up window in the Sirix environment without diverting the trader to an external URL. This is more user-friendly and effective in encouraging more deposits.
Code
Follow the commented code to get more information about the implementation of this plugin.
                var depositWindow = null;
            
                // The function that will be called when the deposit button is clicked
                function onDepositClick (langKey, sessionId, serverUrl)
                {
                    // Pops up the alert message, we used here the `PopBox` plugin
                    // but any other popup plugin will do the trick
                    depositWindow = new PopBox({
                        width: 650,
                        height: 434,
                        html: '
Deposit
' + '
' }).open(); if (webTrader) { // On logout, close the deposit window if its open webTrader.onLogout(function () { if (depositWindow) { depositWindow.close(); } }, this); } };