How to embed Silverlight application into Drupal page

joesftwr - July 2, 2009 - 21:54

I have a Drupal 6.x installation up and running. I also have a silverlight application that I would like to use in one of my pages. My web server is correctly setup to use silverlight. I have a generic HTML (non-Drupal) test page including the following:

<object data="data:application/x-silverlight-2," type="application/x-silverlight-2" width="100%" height="100%">
<param name="source" value="drupal/clientbin/WeatherWidget.xap"/>
<param name="background" value="white" />
               <param name="minruntimeversion" value="2.0.31005.0" />
<a href="http://go.microsoft.com/fwlink/?LinkId=124807" style="text-decoration: none;">
<img src="http://go.microsoft.com/fwlink/?LinkId=108181" alt="Get Microsoft Silverlight" style="border-style: none"/>
</a>
</object>

and can see the application just fine. Now I'm thinking I should be able to use the same as above in the body of a Drupal page? I have:

<object data="data:application/x-silverlight-2," type="application/x-silverlight-2" width="100%" height="100%">
<param name="source" value="/drupal/clientbin/WeatherWidget.xap"/>
<param name="background" value="white" />
               <param name="minruntimeversion" value="2.0.31005.0" />
<a href="http://go.microsoft.com/fwlink/?LinkId=124807" style="text-decoration: none;">
<img src="http://go.microsoft.com/fwlink/?LinkId=108181" alt="Get Microsoft Silverlight" style="border-style: none"/>
</a>
</object>

and get nothing. I have the input format for the page set to Full HTML. This is just a standalone Silverlight application. It doesn't need to communicate with Drupal in any way. Has anyone tried doing anthing like this? Am I missing something?

Thanks,

Try the PHP code input

nevets - July 2, 2009 - 22:18

Try the PHP code input filter.

Found problem ... well not quite

joesftwr - July 3, 2009 - 14:31

I found out that I have a syntax error in the above code. When I fixed that it worked. Well ... not quite. Here's what I found.

  • Safari (OSX) : Works.
  • IE 7/8 (Windows) : Works.
  • Firefox (OSX/Windows) : Doesn't work. Get the image to install silverlight. Doesn't recognize that Silverlight is installed, even though I have verified that the correct version is.

This seems to be a Drupal issue as Silverlight in Firefox outside of the Drupal framework works fine.

 
 

Drupal is a registered trademark of Dries Buytaert.