Queue Sidebar Updates and a Fix

Oct 22, 2008

I've updated the Netflix queue listing here at the site to show what I'm currently watching. The handy Wordpress Netflix Plugin made the change very easy, and I again recommend it.

I've also fixed a validation problem here at the site. My last post included the first YouTube video ever embedded at Year of the Code Monkey. It turns out that XHTML strict, which happens to be the doctype I use, doesn't like the embed element. YouTube gave me this:

<object width="425" height="344">
  <param name="movie"
    value="http://www.youtube.com/v/Y_P6yBJEW38&hl=en&fs=1"></param>
  <param name="allowFullScreen" value="true"></param>
  <embed src="http://www.youtube.com/v/Y_P6yBJEW38&hl=en&fs=1"
    type="application/x-shockwave-flash" allowfullscreen="true"
    width="425" height="344"></embed>
</object>

And I had to change it to this:

<object width="425" height="344"
  data="http://www.youtube.com/v/Y_P6yBJEW38&hl=en&fs=1">
  <param name="movie" value="http://www.youtube.com/v/Y_P6yBJEW38&hl=en&fs=1" />
  <param name="allowFullScreen" value="true" />
</object>

Not only is it now compliant, it looks better too. I'll just have to remember to make this kind of change each time I post a video.

6 Comments

kip

2:47 PM on Oct 22, 2008
I also found that you need to add a type="application/x-shockwave-flash" attribute to the object tag in order for it to work in IE6.

Jonah

3:08 PM on Oct 22, 2008
Thanks for the tip. I'll update the embedded video's code...

Gary

3:45 PM on Oct 22, 2008
Don't you need the embed version for some browsers? That is why we had the nested tags.

Jonah

2:32 AM on Oct 23, 2008
I'm not certain if some browsers require the embed tag or not. XHTML strict doesn't allow it, so I took it out (since I run XHTML strict here at this site). It works in Firefox 3, and that's good enough for me. :)

kip

2:19 PM on Oct 24, 2008
There have been a few A List Apart articles on making flash/video embed XHTML-strict-compliant: Flash Satay: Embedding Flash While Supporting Standards and Bye Bye Embed. The first article is pretty old for the Internet (2002). I know that doing what you've done (plus the type attribute in the object tag) works in at least IE6+, FF2+, Safari (Win Beta), Opera 8+, Chrome Beta. I don't know about older browsers, but anyone still using IE5 or Netscape is probably pretty used to pages not working properly anyway. :)

Jonah

3:30 PM on Oct 24, 2008
Thanks for the links, Kip. I really love A List Apart; it's definitely in the upper crust of the web design world.

Leave a Comment

Ignore this field:
Never displayed
Leave this blank:
Optional; will not be indexed
Ignore this field:
Both Markdown and a limited set of HTML tags are supported
Leave this empty: