Using Window.postmessage() to send a click event - javascript

I am trying to create a single page web application which incorporates outlook's embedded calendar into an iframe. There will be two calendars, one which displays my shared calendar's current month and another one which looks at next month. I would like to use Window.postmessage() to send a click event to the outlook calendar to click the button which sets the calendar to view the next month. I have to use Window.postmessage() due to cross-origin policy as I cant access the elements in the calendars. Is this possible using Window.postmessage()? Is there any example available to show how its done?

Related

Application Insights - is it right to use href as "View page name"?

As I know, Application Insights uses page title as View page name. But my application has simillar page title for all pages. And that is why I always get only one pageview and can`t create propper userflow graph, because AI displays, that user visit only one page all the time.
User flow graph with one pageview
That is why I added this TelemetryInitializer on client side to track pageview by href but I am not shure if it is a right approach.
const telemetryInitializer = envelope => {
envelope.baseData.name = window.location.href;
};
appInsights.addTelemetryInitializer(telemetryInitializer);
Maybe Azure Team has any other way to do it without changing page title?
There are a variety of ways to approach this. Application Insights User Flows starts from a page view, custom event, or exception that you specify. In my example below, I've used custom events. A custom event in JavaScript might look like this:
appInsights.trackEvent({name:"SuccessfulUserLogin"});
(For detailed instructions on how to log custom events, see the documentation on TrackEvent.)
Here I've used the custom event "SuccessfulUserLogin" as the Initial Event in Application Insights to create a User Flows graph:
That in turn allowed me to track the user flow using the custom events that I specified on other pages (tracking the custom event "VisitedUserForum" on the user forum page and "VisitedFeedbackForum" on the feedback forum page even if both pages were named "forums"):

Outlook365 Add-In Event on Change Attendee Action

I am working on to creating Outlook ADD-In for Outlook365 cloud account.
I want to capture event on attendees change i.e rather than manually clicking on Add-In icon for every change, if someones Add or remove some attendee from calendar invite, the event can be captured and some java script function can be called in my Add-In app.
In case your add-in is active and attendees are changed in appointment window, you can get events when attendees are changed. requirement set 1.7 for Outlook 2016 was made GA during IGNITE.
You need to handle RecipientsChanged events.
https://learn.microsoft.com/en-us/javascript/office/objectmodel/requirement-set-1.7/outlook-requirement-set-1.7?view=office-js
You can also refer to the following youtube video for an example
https://youtu.be/xbUcGlcnfxQ
In case you want without add-in being active, you need to use graph API web-hooks to get notified of the change.

Google Calendar dashboard

I'm creating a web page dashboard that I will display on a screen in my house for my family to see, the dashboard will have a calendar, weather widget and 2 other widgets: Today's events and reminders from my Google calendars account.
The question is how can I get a feed to display a list of today's events and another list of today's reminders from Google calendar? This is a static page and it will be a read-only page so no events can be added from this page. I went to Google Calendar API but couldn't find anything, most of the documentation there is about creating apps that allows the creation and invitation to events but no current data displayed. Am I looking at the wrong place?
Use the Events.list to display all events related to you.
HTTP request
GET https://www.googleapis.com/calendar/v3/calendars/calendarId/events
Use the Try-it to test this now.
How the data is presented in your own UI is up to you.

How to get specific links when you click the scrolling text in meteor

I am new to Meteor framework.
I am having a doubt, can anyone clear me..
I have scrolling events from bottom to up. Whenever i click an event that is being scrolled, i want to open in a new tab. Every event is having a specific href.
How to do this application using the database.
I want to store all the events in database and parllely i want to add new events directly from website and store them in database and fetch the event to the scrolling area.
Meteor is a good choice for this. Have you decided how to do the UI? Will you use bootstrap or material design. Do you have a scroller in mind?
You can set up your server process to make http requests to fetch data from another web site (using RESTAPI?) and store them in the database. https://atmospherejs.com/percolate/synced-cron lets you schedule regular server processing runs.
Thanks to Meteor's reactivity, the UI doesn't need to concern itself with the back end, data will simply appear, and a helper task will run every time to deal with changes to the data.

Classic ASP - How to pass a variable instead querystring (refresh) via Jquery(no refresh)

i'm working on this application that has a calendar on a page that has a lot of request.form("var") inside.
This is a monthly calendar and it has on the top previous month and next month .
When i click now on next month i get an URL like: ?date=8/14/2010
My question is how to pass this value to the calendar via jquery with no page refresh .. because if i use page refresh i loose the request.form("values")
Hope i make myself understand ,
thank you
If you use AJAX, you can send requests and get information without refreshing the page. As far as I know, JQuery has some functions built in to make AJAX pretty easy.
Another common way this is done is to use the anchor rather than the query string (e.g. http://example.com/page.asp#8/14/2010), because then you can still link directly to the page as it is, and changing the anchor doesn't cause the page to refresh and can be red by JavaScript. GMail and Facebook both use this, which is why you can scroll through pictures fast without reloading the page for every picture.

Categories

Resources