cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1454
Views
0
Helpful
3
Replies

Jabber for windows custom tab > JavaScript functions not called

Hey everyone..

 

we try to use some javascript functions to get notification badges. It seems that the javascript functions

  • onPageDeselected
  • onPageSelected
  • onHubDeActivated
  • onHubActivated
  • onHubResized

are not called.

Here an example we test with:

 

 

<html>
        <head>
                <script type="text/javascript">   

                                function OnLoadMethods()
                                 {
					 SubscribePresence();
                                         GetUserLocale();
					 window.external.SetNotificationBadge('33');
                                 }
								 
                                 function OnPresenceStateChanged(jid, basicPresence, localizedPresence) 
                                 {
                                          var cell = document.getElementById(jid);
                                          cell.innerText = basicPresence.concat(", ",localizedPresence);                                                   
                                 }              
                                                           
                                 function GetUserLocale()
                                 {
                                          window.external.GetUserLocale();
                                 }
                                                           
                                 function SubscribePresence() 
                                 {
                                          window.external.SubscribePresence('john.doe@example.com');
                                 }

                                 function OnLocaleInfoAvailable(currentLocale)
                                 {
                                          var cell = document.getElementById("JabberLocale");
                                          cell.innerText = currentLocale;
                                 }
 
                                 function onHubActivated()
                                 {
                                          var cell = document.getElementById("hubActive");
                                          cell.innerText = "TRUE";
                                 }
                                                                
                                 function onHubDeActivated()
                                 {
                                          var cell = document.getElementById("hubActive");
                                          cell.innerText = "FALSE";
                                 }
 
                                 function onHubResized()
                                 {
                                          alert("Hub Resized or Moved");
                                 }                              

				function onPageSelected()
				 {
					var cell = document.getElementById('TabSelected');
					cell.innerText = "Selected";
					window.external.SetNotificationBadge('11');
				 }
				function onPageDeselected()
				 {
					var cell = document.getElementById('TabSelected');
					cell.innerText = "Deselected";
					window.external.SetNotificationBadge('22');
				 }
                     </script>
               </head>
 
               <body onload="OnLoadMethods()">
                     <table>
                                 <tr>
                                             <td>John Doe</td>
                                             <td id="john.doe@example.com">unknown</td>
                                 </tr>
                    </table>
                    <table>
                                 <tr>
                                             <td>Jabber Locale: </td>
                                             <td id="JabberLocale">Null</td>
                                 </tr>
                                 <tr>
                                             <td>Hub Activated: </td>
                                             <td id="hubActive">---</td>
                                 </tr>    
                                 <tr>
                                             <td>Tab selected: </td>
                                             <td id="TabSelected">---</td>
                                 </tr>								 
					</table>
               </body>
 
</html>

 

 

 

Does anyone know if that was changed in the current version (12.X) or somewhen before? We believe it was working in Jabber for Windows Version 11.X.

 

Any idea?

 

Eike

3 Replies 3

dstaudt
Cisco Employee
Cisco Employee

Not aware of any issues, but not super-familiar with this functionality.  It would be interesting to know if these were all working in a particular earlier version...

Might recommend opening a ticket with DevNet dev support, who can look at trace logs and consult with Jabber engineering to identify the root cause: https://developer.cisco.com/site/support/

Hi David

 

thanks. I'll create a ticket.

 

What we found so far is, that the beahivior is different between chromium engine and IE engine. It seems that the javascripts are called when jabber is forced to use IE engine with the client option <BrowserEngineForCustomTab>IE</BrowserEngineForCustomTab>.

But the badges are showing 99+ and decoding of text is also wrong.

 

Regards

Eike

Hi Eike,

 

Did you find the solution? I think its a browser issue.

 

Regards,

Umesh

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: