Charmed Quark Systems, Ltd. - Support Forums and Community
Google Calendar and Web Browser - Printable Version

+- Charmed Quark Systems, Ltd. - Support Forums and Community (https://www.charmedquark.com/vb_forums)
+-- Forum: General Discussion (https://www.charmedquark.com/vb_forums/forumdisplay.php?fid=3)
+--- Forum: CQC Support (https://www.charmedquark.com/vb_forums/forumdisplay.php?fid=9)
+--- Thread: Google Calendar and Web Browser (/showthread.php?tid=10807)



Google Calendar and Web Browser - kblagron - 04-22-2019

I don't know much about html but can usually figure out enough to get a webpage to display on CQC with a web widget.  I am having a problem getting a Google Calendar to display using the tools they provide within their Google Calendar settings.  You can generate a customized embedded script using IFrames to place into your webpage, which I did.

I can run the .html file I built without problems on both Chrome and IE, but I get an error message when using the WebBrowser widget as follows:

1st Error: Object doesn't support property or method 'map'
2nd Error: Object doesn't support property or method 'addEventListener'

Here is the html file I access in the /HTMLRoot folder:
Code:
<!DOCTYPE html>
<html>

<head>
</head>

<body>
<iframe src="https://calendar.google.com/calendar/embed?showTitle=0&amp;showNav=0&amp;showDate=0&amp;showPrint=0&amp;showTabs=0&amp;showCalendars=0&amp;showTz=0&amp;mode=AGENDA&amp;height=520&amp;wkst=1&amp;bgcolor=%23FFFFFF&amp;src=emailaddy1%40gmail.com&amp;color=%2329527A&amp;src=emailaddy2%40gmail.com&amp;color=%23182C57&amp;src=en.usa%23holiday%40group.v.calendar.google.com&amp;color=%23125A12&amp;ctz=America%2FChicago" style="border-width:0" width="284" height="520" frameborder="0" scrolling="no">
</iframe>
</body>
</html>



RE: Google Calendar and Web Browser - kblagron - 04-23-2019

I have diagnosed this a bit further - The IV will display the Web widget properly (without the errors) on the CQC Master Server.  It is the client PC's that are throwing the error above.  It's the same version/build of Windows.  Also, the calendars I am trying to display are tagged as public within Google Calendar.


RE: Google Calendar and Web Browser - Dean Roddey - 04-23-2019

You may need to check the compatibility version for embedded browser windows. You may have in the past cranked it up higher on the MS or something.

https://docs.microsoft.com/en-us/previous-versions/windows/internet-explorer/ie-developer/general-info/ee330730(v=vs.85)

You might also put this value in the Meta section of the html and see if that helps.

<meta http-equiv="X-UA-Compatible" content="IE=edge"/>


RE: Google Calendar and Web Browser - kblagron - 04-23-2019

I decided to go a different route, and actually like it much better, as I really just wanted an option to view the Google Calendar rather than manipulate it, which could happen using the WebBrowser widget.

Rather than use a WebBrowser Widget, I am going to generate a screenshot of the calendar using Chrome's headless command:

Code:
chrome --headless --disable-gpu --screenshot="C:\Program Files\CQC\CQCData\HTMLRoot\MenuGCal.png" --virtual-time-budget=3000 --hide-scrollbars --window-size=284,528 "http://cqcserver\MenuGCal.html"

I can run this as a scheduled task using the MS Task Scheduler on the master server that will generate a .png file in the \HTMLRoot folder that will be displayed.

What I like about this is that it will allow it to be viewed with WebRiva.  I am going to do this in a few other places on my Interfaces as well.  I currently have a toggle when logged in via WebRiva, and it will allow me to show a static image rather than a WebBrowser Widget.


RE: Google Calendar and Web Browser - kblagron - 04-25-2019

Just as an FYI in case anyone else is wanting to do this, adding this to the html script just below the <html> tag:

<meta http-equiv="X-UA-Compatible" content="IE=10;"/>

allowed the web browser widget to work properly on both Win10 and Win7 computers.