Connect method

Top  Previous  Next

The "connect" method creates the application and places it on the specified html structure. In order to do so, it expects a JSON object as argument in which you can inform all the desired settings. If you want to understand exactly how each setting will influence on the connection, read the following topics:

 

Placement parameters

Application parameters

Settings parameters

Event parameters

 

Right bellow, you will find the connect method with all the possible parameters set. They should not be sent all together, because each mode and environment will require a different JSON object setup.

 

The Placement parameters will be required depending on the connection mode (remote or local).
The Application parameters will configure which application and the authentication information generated previously.
The other parameters (Settings and Events) are optional and should be sent whenever you need to change a determined WebFMX behavior.

 

 

 

 webfmx.connect({

 

         // Placement

         targetWindow: "substitue with the iframe id or window name",

         exitURL :     "about:blank",

         postpage:     "connection.html",

         divId :       "webfmx",

 

         // Application

         profileKey: "substitute with the application Key",

         profilePass: "substitute with the generated password",

 

         // Settings

         resolution:     "fittobrowser",

         width:           $(window).width(),

         height:          $(window).height(),

         maxWidth:        0,

         maxHeight:       0,

         showToolbar:     false,

         scaled:         false,

         clipboard:       true,

         showToolbar:     true,

         fitToBrowser:   true,

 

         // Events

         events: {

                 onServerConnecting           : function (reconnecting) { },

                 onQueryDisconnect            : function () { },

                 onServerConnect              : function () { },

                 onSessionStart               : function () { },

                 onServerConnectionError      : function (errMessage) { },

                 onServerDisconnect           : function () { }

               }

 });

 

 

If you are using the SDK Authentication Scheme, you should call the method IsOneTimeKeyValid, before connecting. This method will validate the authentication key and password and open a new client session.