Tuesday, October 07, 2008

Detect Silverlight Availability in the Web Browser with a simple JavaScript

Detect Silverlight Availability in the Web Browser with a simple JavaScript

Silverlight is fast getting popular but when we rollout our website with Silverlight features, we should ensure that our users are informe gracefully if they don't have Silverlight installed. Fortunately, the core silverlight functionality is given by Microsoft as a simple JavaScript library. We just need to refer the silverlight.js and then call a simple property. If it returns true, we know that Silverlight is installed on the web browser.

1) Get Silverlight.js from here and refer it from your webpage after duly publishing it to your web page.
2) <Script Language="JavaScript">
if (Silverlight.isInstalled)
alert ("Congrats. Your web browser is enabled with Silverlight Runtime");
</Script>

1 comment:

Browser Detection said...

For getting the sliverlight version, try view the source code at http://checkbrowser.info so you will no how easy it will be.

[Imported from Blogdrive]Online Virus Scanners

Online Virus Scanners Virus Scanners are no longer difficult to install, tedious to configure. There are easy to use Online Virus Scanne...