Click to See Complete Forum and Search --> : [RESOLVED] XHTML Strict+YouTube embed = Not Valid


AmazingAnt
11-11-2006, 12:48 PM
I have a page written in XHTML 1.0 Strict, and for some reason when I add the standard YouTube embed code to the page:
<object width="425" height="350"><param name="movie" value="YouTube URI HERE"></param><param name="wmode" value="transparent"></param><embed src="YouTube URI HERE" type="application/x-shockwave-flash" wmode="transparent" width="425" height="350"></embed></object>
I get errors about how the attributes "src", "type", "wmode", "width", and "height "do not exist, and that the "embed" element is undefined...
I tried changing to the transitional doctype and it still gives me the same errors... What can I do?

reportingsjr
11-11-2006, 12:52 PM
I do believe that the embed tag is deprecated. You need to use object. Have fun trying to find the code :p

AmazingAnt
11-11-2006, 01:01 PM
Have fun trying to find the code :p
Mmm, Thanks... Aparently if I just remove the embed tag, it validates correctly. But then it doesn't work.

Anyone else out there know how I can get this working with the object tag?
Pleasy cheasy?

reportingsjr
11-11-2006, 01:04 PM
Maybe try taking out the embed tag all the way, not just placing an object tag around it.. XD then type in the actual URL?

AmazingAnt
11-11-2006, 01:12 PM
Maybe try taking out the embed tag all the way, not just placing an object tag around it.. XD then type in the actual URL?
I tried that, and then the video wouldn't load in any web browser. Plus, the embed tag was surrounded by the object tag when I got it from YouTube. It wasn't my doing.

But, with a quick Google search I found that I'm not the first to have this problem, and I got some code to fix the problem.

reportingsjr
11-11-2006, 01:15 PM
good, could you post it please?

AmazingAnt
11-11-2006, 01:25 PM
indeed.

<object type="application/x-shockwave-flash" style="width:425px; height:338px;"data="http://www.youtube.com/v/CIViuOQBk3c"><param name="movie" value="http://www.youtube.com/v/CIViuOQBk3c" /></object>

Enjoy. and btw, that's a video of a skate-boarding dog if you care to watch it yourself.

reportingsjr
11-11-2006, 01:28 PM
Thank you, I will watch it :D