I have two applications one already installed at client side, and a web application hosted on some server, in web appl开发者_如何转开发ication there is a page from which there is an option to run that application, but I dnt how can I do this.
Any help will be appreciated.
Thanx
I believe you would have to make the client apps register as the default handlers for a particular MIME type, then make the server return a document of that MIME type. Whether the browser just launches the app or asks the user whether they want to do so will depend on the browser.
The Amazon MP3 Downloader is an example of this.
You can't just run an arbitrary client app - that would be a security nightmare.
register a protocol on user machine when user install that application. Call the protocol from user event on page (html). See how yahoo opens its messenger when you click buddy icon on yahoo mail. Limitation, I have not tested it on MAC or Linux machine.
You could register a custom file extension for your client app. Have the user click a link that downloads a small file with that extension. If your executable is registered to handle that extension/content type on the client machine, the browser should prompt the user to open the file with your app, or just go ahead and do it depending on the browser used and their security settings.
精彩评论