robinhodemorais Posted September 10, 2021 Share Posted September 10, 2021 I'm using sockt.io to receive push and pass messages to other users if I'm connected on the same screen, for this I'm using ajaxevent, but I noticed that when another page (user) opens, an error occurs not finding the object (screen ) from the previous open page, it seems that it is lost or because it is the same object (screen) the previous one is destroyed, at this moment it only works on the last opened page, the previous ones give the error below. I'm using a uniFrame Error Quote Event:pushWhats, Object: O7C not found in session list. It could be timed out, refresh page and try again. conection socket and ajaxevent xHTML := ' socketWhats = io.connect('''+pIP_APIWHATSAPP+''' '+ ' ,{transports: [''websocket'']} ' + #13#10 + ' );' + #13#10 + ' socketWhats.emit(''join'','''+lbSessao.Caption+''');' + #13#10 + ' socketWhats.on(''enviaPushRoom'', function(msg){ ' + #13#10 + ' ajaxRequest('+FormRegion.JSName+', "pushWhats", ["return=" + JSON.stringify(msg)] ) ' + #13#10 + '}); ' + ' socketWhats.on(''enviaPushRoom'', (data)=>{ '+ ' var now = new Date;'+ ' var hora = now.getHours() + ":" + now.getMinutes() + ":" + now.getSeconds(); '+ ' console.log(''socketWhats'',hora,JSON.stringify(data)); '+ ' });'; Self.UniSession.AddJS(xHTML); Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.