You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I Have A login page and chat page in another tab so when i m going to there the connection object seems to be null how could we get that connection object there
Here Is Below My code 👍
var Connection = (function(self, $) {
var obj = null, connection = null;
console.log(self);
self.connect = function(options) {
connection = new Strophe.Connection(options.url);
connection.connect(options.jUserId, options.password, self.onConnect);
console.log(connection);
alert(connection);
};
self.onConnect = function (status) {
if (status == Strophe.Status.CONNECTING) {
self.debug('Strophe is connecting.');
} else if (status == Strophe.Status.CONNFAIL) {
self.debug('Strophe failed to connect.');
} else if (status == Strophe.Status.DISCONNECTING) {
self.debug('Strophe is disconnecting.');
} else if (status == Strophe.Status.DISCONNECTED) {
self.debug('Strophe is disconnected.');
} else if (status == Strophe.Status.CONNECTED) {
self.debug('Strophe is connected.');
//get roster
I Have A login page and chat page in another tab so when i m going to there the connection object seems to be null how could we get that connection object there
Here Is Below My code 👍
var Connection = (function(self, $) {
var obj = null, connection = null;
console.log(self);
self.connect = function(options) {
connection = new Strophe.Connection(options.url);
connection.connect(options.jUserId, options.password, self.onConnect);
console.log(connection);
alert(connection);
};
self.onConnect = function (status) {
if (status == Strophe.Status.CONNECTING) {
self.debug('Strophe is connecting.');
} else if (status == Strophe.Status.CONNFAIL) {
self.debug('Strophe failed to connect.');
} else if (status == Strophe.Status.DISCONNECTING) {
self.debug('Strophe is disconnecting.');
} else if (status == Strophe.Status.DISCONNECTED) {
self.debug('Strophe is disconnected.');
} else if (status == Strophe.Status.CONNECTED) {
self.debug('Strophe is connected.');
//get roster
}(Connection || {}, jQuery));
and while chat there is my js beeing like that 👍
$(document).ready(function() {
});
But here the response is been empty here while retrieving can you please help me out of this ...
The text was updated successfully, but these errors were encountered: