John
John

Reputation: 131

What can I use instead of ActiveX that will work in most Browsers

Below is an ActiveX solution to opening an Access program that resides on the users local machine.

  <script type="text/javascript">
    function Start() {
      var connX = new ActiveXObject("Access.Application");
      connX.OpenCurrentDatabase("C:\\Database1.accdb");
      connX.Visible = true;
    }
</script>

I want this to be able to be run from most browsers and not be ActiveX. How do I do that?

Assume use has Access and the OS is Windows 7 or 8 or 10. I would like the solution to work on IE, Edge, Chrome, Firefox, and Safari. If solution can not work on any of those browsers let me know what browsers it does work on.

How does Craig's list call up whatever your email client is and pass that program data like subject and to and body of email?

I was wondering if the same methodology could be use to call the local database client (instead of the local email client) which in this case would be Microsoft Access.

Upvotes: 0

Views: 416

Answers (1)

Josiah Keller
Josiah Keller

Reputation: 3675

Craigslist activates your email client using a mailto: link. For example, the link below starts a new email to "[email protected]" in the default email client and fills in the subject "foobar" and the body "qwerty".

<a href="mailto:[email protected]?subject=foobar&body=qwerty">Email someone</a>

Modern browsers do not expose any interface for launching arbitrary applications on the user's system.

However, some applications do register their own custom URI protocols to allow browser links to launch the app. For example, the Windows 10 Feedback app does this so that you can click a link in your browser and it will take you to a specific place within the app.

It appears some newer versions of Access might do this too. I doubt it will just let you open any old document on the user's system, but you can play around with it and see if it will meet your needs.

Upvotes: 3

Related Questions