Browser control fails to recognize response to chat request

Started by Douglas Martin, January 04, 2018, 11:37:15 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Douglas Martin

I am using the following code to launch a browser control inside a PBWIN application. I pass in the URL https://app.teamsupport.com/Chat/ChatInit.aspx? with some additional parameters to start a CHAT feature. The page renders asking the user to identify themselves and enter a question and then click submit to request a chat.

We see the chat request, and accept. The issue is the page never responds to the fact that the chat has been accepted. eventually it just times out.

I am trying to figure how to debug what is happening and why the browser control, is not responding to the response that we have accepted the chat?. I can paste the URL into chrome and open the developer tools, not sure what I should be looking for, it all works fine. Same for IE11.

At some locations the CHAT feature works fine. Could it have something to do with the ISP blocking some content or the firewall having some ports closed?

Some browser settings blocking Javascript?

If i copy and paste the CHAT URL into IE11 and run it on the machine it works fine?
SUB AddBrowser(BYVAL FormName$, Layer As Integer, HTMLfile As String)
   ' // Save the script as a temporary file
   LOCAL bstrTempFileName AS WSTRING
'   bstrTempFileName = AfxSaveTempFile(s, "", "TMP", "html", 1)
   ' // Create the WebBrowser control with the embedded map
   LOCAL nWide, nHigh AS LONG
   ' // Create an instance of the class
   LOCAL pWindow AS IWindow
   pWindow = CLASS "CWindow"

' **********************************************
'    DIALOG GET CLIENT hDlg TO nWide, nHigh
' **********************************************
'   EZGUI version:
' ------------------
   LOCAL FW!, FH!, hDlg AS LONG
   EZ_GetSize FormName$, FW!, FH!, 2 ' get client area in pixels
   nWide = FW!*.5
   nHigh = FH!*.5
   hDlg = EZ_Handle(FormName$,0)
' **********************************************
   EZ_SetLayer Layer

   ' // Create an instance of the event class
   LOCAL pWBEvents AS DWebBrowserEvents2Impl
   pWBEvents = CLASS "CDWebBrowserEvents2"


   If InStr(HTMLfile, "http") Then
     pWindow.AddWebBrowserControl(hDlg, %IDC_WEBBROWSER, HTMLfile, pWBEvents,  1, 1, nWide, nHigh)
   Else
     pWindow.AddWebBrowserControl(hDlg, %IDC_WEBBROWSER, RamDrive+HTMLfile, pWBEvents,  1, 1, nWide, nHigh)
   End If     
     ' hCtrl& is handle of a control created using a
     ' non-EZGUI command. ie. a Third party DLL
   EZ_AssignID hDlg, %IDC_WEBBROWSER
   EZ_SetLayer Layer
   EZ_PutOnLayer FormName$, %IDC_WEBBROWSER

   ' // Default message pump (you can replace it with your own)
   'pWindow.DoEvents(iCmdShow)

END SUB
Doug

José Roca

You are connecting events in a SUB using a local variable? The class will be destroyed as soon as the SUB will end.

Douglas Martin

#2
I made pWindow and PWBEvents global vars.  I still get the same result.  Click on submit,  the team support web site recognizes there is a chat request.

I accept the chat but browser control never renders that the chat has been accepted.

The app works on my Windows 10 Pro system and some other systems.

Does not respond to chat acceptance on Windows Embedded Standard Service Pack 1.

I will apply all windows updates to see if that helps.

Any other suggestions?
Doug