Workaround for Firefox issue

Dec 19, 2007 at 10:18 AM
I have recently created project with Slide.Show gallery and run into the problems when view my page in FireFox (Slide.Show samples also don't work). The reason was this bug http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1523212&SiteID=1 in FireFox, that do not allow Silverlight to render when DOCTYPE is specified as XHTML. The resolution is quite simple: is to render Slide.Show inside iframe without !DOCTYPE
Dec 19, 2007 at 5:29 PM
A reader alerted me that they can't view my Slide.Show in Firefox (fine in IE, though). However, I am hosting inside an IFRAME, and the hosted HTML file does not have a DOCTYPE set. Any ideas?

http://blogs.msdn.com/mswanson/archive/2007/12/18/silverlight-slide-show.aspx
Dec 19, 2007 at 5:29 PM
Edited Dec 19, 2007 at 5:30 PM
And BTW, I have installed the latest version of Firefox on my machine, and I see the same behavior...no Slide.Show in the post.
Coordinator
Dec 19, 2007 at 6:45 PM
Edited Dec 20, 2007 at 3:31 AM
@MSwanson, I viewed the source on your page and think I found the issue. Can you try removing the empty src attribute from the following line?

<script type="text/javascript" src="">
	new SlideShow.Control(new SlideShow.XmlConfigProvider());
</script>
Since this is an inline script tag the src attribute is unnecessary. I have a feeling that Firefox's stricter standards are what's preventing your page from working for all users.

Please let me know if this fixes your issue, and if you have additional questions or feedback. Thanks!
Coordinator
Dec 19, 2007 at 6:54 PM
Edited Dec 20, 2007 at 3:32 AM

snautz wrote:
The resolution is quite simple: is to render Slide.Show inside iframe without !DOCTYPE

@snautz, your suggestion above is actually a workaround for the issue detailed here. Microsoft actually released an update to Silverlight 1.0 in November that truly fixes this problem. But my assumption is that you have Silverlight 1.1 Alpha installed, which prevented you from receiving the auto-update. The good news is that this is probably only an issue for early adopting developers... :)

Tim Sneath also has an interesting post regarding this issue.
Dec 19, 2007 at 9:18 PM
Good call, billyzkid. I removed the empty src attribute, and all is well in Firefox. Not sure why I ever added that attribute to be honest. Such is life. :-) Thanks for the quick help.
Coordinator
Dec 20, 2007 at 3:35 AM

MSwanson wrote:
Not sure why I ever added that attribute to be honest. Such is life.

My guess is that you copied and pasted it in by accident... but glad to help!
Jan 16, 2008 at 10:24 PM
Edited Jan 16, 2008 at 10:51 PM
I could use some further assistance with this issue. I am running .net 2.0. I created a seperate .htm file and stripped it down to match what is on the blog listed above. I however am unable to still get it to work on Firefox. The aspx page that has the iframe is inside a master page (not sure if that is causing it but wanted to add that in). On the firefox browser, I get an error message saying "Undefined property: #text". Everything works great in IE.

I pulled the .js files from the latest rev on the site just the other day.

Any ideas would be greatly appreciated. I don't have it up on a public area as of yet to view. I can attach any source/code needed.

When going through the quick start, the section where I use
<script type="text/javascript"> new SlideShow.Control(); </script>
works fine. I only get the error after changing it to

<script type="text/javascript">
new SlideShow.Control(new SlideShow.XmlConfigProvider());
</script>
Jan 20, 2008 at 5:52 AM
Okay! I've got a "trial" SlideShow working in IE (here: http://tasteofhawaii.com/P3/SlideShows/Default.html ) but it will not come up with anything other than ALL black on FireFox 2 and Safari. As I like to certify all of my projects for these three common browsers, I am at a loss to understand what's going on.

The entire contents of my HTML file are here:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>Taste of Hawaii - Slide Show: 2006 Photos</title>
<style type="text/css">
html,body,.SlideShow
{
height: 100%;
}
body
{
margin: 0px;
}
</style>
<script type="text/javascript" src="Silverlight.js"></script>
<script type="text/javascript" src="SlideShow.js"></script>
</head>
<body>
<script type="text/javascript">
new SlideShow.Control(new SlideShow.XmlConfigProvider());
</script>
</body>
</html>

===============

Any hints gratefully accepted. This is a really nice presentation tool, but it would be good to have it work for all of the common browsers.

mahalos (thanks) in advance ... :) KevInKauai
Coordinator
Jan 21, 2008 at 1:17 PM
Edited Jan 21, 2008 at 1:20 PM
@KevInKauai, I just clicked the tasteofhawaii.com link you provided and your slideshow works great for me in IE, Firefox, AND Safari!

It sounds like you might be suffering from the issue described here -- read the last post in that thread. You need the latest service release for Silverlight 1.0, which doesn't get automatically updated if you have the 1.1 Alpha installed. Please let me know if this fixes your problem.
Jan 21, 2008 at 10:53 PM
Confusion, inc.!

How do you tell which date of the Silverlight,js is THE proper one? I'm reluctant to do a new install from the link you provided as it seems to be a "sloppy install" (requiring me to de-install things! yuck!). ALL of the "silverlight.js" files that I have are dated 11/16/2007 with a time of 6:05 PM. (That would seem to be the November release you mention in your other posting.)

ALSO, if I'm using a component that requires an extra download step in coming to a particular page, I like to "pre-warn" the user that something out-of-the-ordinary is going to happen on the way. Is this applicable in this case?

This should be a lot simpler, imho.

mahalos, again ... :) KevInKauai
Jan 22, 2008 at 2:12 PM
I tried this already, as I was using the alpha 1.1.
For kicks and giggles, I tried it again. Could there be something wrong with the latest js files that is causing this? I stripped this down to a simple html page and still will not work on firefox.

<!--Begin HTML-->
<html>
<head>
<title>Untitled Page</title>
<script type="text/javascript" src="javascript/silverlight.js"></script>
<script type="text/javascript" src="javascript/slideShow.js"></script>
</head>
<body>
<script type="text/javascript">
new SlideShow.Control(new SlideShow.XmlConfigProvider());
</script>
</body>
</html>


<!--Begin Config file-->
<?xml version="1.0" encoding="utf-8" ?>
- <configuration width="530" height="400" background="Silver">
- <modules>
<module type="SlideViewer" />
<module type="ProgressBar" />
<module type="SlideDescription" />
- <module type="NavigationTray">
<option name="thumbnailViewer.left" value="83" />
</module>
</modules>
- <transitions>
<transition type="FadeTransition" name="CrossFadeTransition" />
- <transition type="WipeTransition" name="WipeRightTransition">
<option name="direction" value="Right" />
</transition>
</transitions>
<dataProvider type="XmlDataProvider" />
</configuration>

<!--Begin Data XML-->

<?xml version="1.0" encoding="utf-8" ?>
- <data transition="CrossFadeTransition">
- <album title="Album Title #1" description="Album Description #1" image="Images/callout_merrickpark.jpg">
<slide title="Slide Title #2" description="Slide Description #2" image="Images/calloutwordalive.jpg" thumbnail="Images/calloutwordalive.jpg" />
<slide title="Slide Title #3" description="Slide Description #3" image="Images/calloutmerrickpark.jpg" thumbnail="Images/calloutmerrickpark.jpg" />
<slide title="Slide Title #4" description="Slide Description #4" image="Images/calloutwordalive.jpg" thumbnail="Images/calloutwordalive.jpg" />
<slide title="Slide Title #5" description="Slide Description #5" image="Images/calloutmerrickpark.jpg" thumbnail="Images/calloutmerrickpark.jpg" />
<slide title="Slide Title #6" description="Slide Description #6" image="Images/calloutwordalive.jpg" thumbnail="Images/calloutwordalive.jpg" />
</album>
</data>



billyzkid wrote:
@KevInKauai, I just clicked the tasteofhawaii.com link you provided and your slideshow works great for me in IE, Firefox, AND Safari!

It sounds like you might be suffering from the issue described here -- read the last post in that thread. You need the latest service release for Silverlight 1.0, which doesn't get automatically updated if you have the 1.1 Alpha installed. Please let me know if this fixes your problem.