Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Javascript that Creates an Outlook Appointment - Browser Issue

I was looking into a script embedded in a webpage that creates an Outlook appointment and opens it. I tested a sample appointment shared by Brian White: http://www.winscripter.com/WSH/MSOffice/90.aspx and embedded it in a sample web page, but here are two problems:

  1. The script works only in IE and not in any other browser.
  2. IE issues a security message about an ActiveX control and asks if to enable it.

Do you have any idea how to make it work in all browsers and not to scare users with the ActiveX warning?

Thank you in advance!

like image 575
user3123223 Avatar asked Mar 09 '26 20:03

user3123223


1 Answers

The script you've linked to works by creating an instance of the Outlook ActiveX control. As such, no, there's no way to make this work in browsers that don't support ActiveX, which is effectively all of them except Internet Explorer.

As for not scaring the users with the ActiveX dialog box, that's not in your hands. The warning message is a security feature, part of the browser itself, and can only be disabled by changing the browser's settings - which isn't something you can do through code, for obvious reasons!

If it's appropriate to your situation, rather than do this through client-side javascript your could instead use Exchange Web Services on the server-side. This comes with its own set of limitations and things to be aware of, namely (a) it's obviously impossible to open Outlook with this method, and (b) on the server-side you'd require access to the Exchange server and would need to know the username/password of an Exchange user with permission to write to the relevant calendar (which is only going to happen if we're talking about a corporate environment).

like image 108
Chris Avatar answered Mar 12 '26 09:03

Chris