...

View Full Version : I'm trying to validate a page with an flv player in it



falleri
11-14-2008, 12:49 PM
Hello all,
I have redesigned my site and decided to turn to an open source flv player (osflv.com) for my videos since I no longer use dreamweaver (I now use textmate). Besides, dreamweaver's options for embedding video were ok, but made validating the page impossible. However.. I now have the same problems: lots and lots of validating errors and no idea how to solve all of them. I solved a few like
script language='javascript' had to be
script type='text/javascript' but the rest is just too much for me, I'm just a beginner in php. I would like to have valid code though.

So my question(s) would be.. does anyone know what I can do about this (the w3c explanations are not that understandable for me, the php newbie..)
OR
does anyone know of a nice, valid player I could use instead?

You can find the page I am having problems with here: ardini.nl/videokunst.php (http://www.ardini.nl/videokunst.php), the w3c errors here:
w3c validation of videokunst.php (http://validator.w3.org/check?uri=http%3A%2F%2Fwww.ardini.nl%2Fvideokunst.php&charset=%28detect+automatically%29&doctype=Inline&ss=1&group=0&user-agent=W3C_Validator%2F1.591)
and the file that is probably causing it all would be here: flash.php ("http://www.ardini.nl/flash/flash.php') (if necessary I can of course put that code in a post, it won't open like this)

tomws
11-14-2008, 06:03 PM
Start with the first error and work your way down. Often, fixing one error will eliminate many others.

The first one I'm seeing as of now is 'Line 38, Column 30: character "&" is the first character of a delimiter but occurred as data'. Try wrapping your script contents there in html comments like this:

<script type="text/javascript">
<!--
/* your javascript here */
//-->
</script>

I'm not sure how the validator handles javascript in the body, but that might take care of the first one, and if it does, you'll probably see a stack of those current validation errors disappear.

EDIT: Also, CDATA tags are available, and I just found this (http://www.evotech.net/blog/2007/05/including-javascript-in-xhtml/):

Including Valid Inline Javascript in XHTML
You may notice that your XHTML does not validate because of code in your javascript. Here is the correct way to include an internal javascript file:
<script type="text/javascript">
//<![CDATA[

code here

//]]>
</script>

_Aerospace_Eng_
11-15-2008, 06:05 AM
How is any of this a php issue? PHP outputs html so this should be in the html/css forum.

Fou-Lu
11-15-2008, 07:07 AM
How is any of this a php issue? PHP outputs html so this should be in the html/css forum.

Definitely not PHP
Moving thread.

Major Payne
11-16-2008, 07:25 AM
Lot of your "errors" are with the ampersand not using the character entity. Since you are using the embed tag, you might use the following example that validates XHTML Strict. Just insert your necessary info for your flv player and set styles to fit:
<script type="text/javascript">document.write("<embed type='application/x-mplayer2' pluginspage='http://microsoft.com/windows/mediaplayer/en/download/' id='mediaPlayer' name='mediaPlayer' displaysize='4' autosize='-1' bgcolor='#000065' showcontrols='true' showtracker='-1' showdisplay='0' showstatusbar='-1' videoborder3d='-1' style='width: 320px; height: 285px;' src='http://l.yimg.com/a/i/mntl/ww/06q3/yodel.swf' autostart='true' designtimesp='5311' loop='true' />")</script>

Apostropartheid
11-16-2008, 10:51 PM
Lot of your "errors" are with the ampersand not using the character entity. Since you are using the embed tag, you might use the following example that validates XHTML Strict. Just insert your necessary info for your flv player and set styles to fit:
<script type="text/javascript">document.write("<embed type='application/x-mplayer2' pluginspage='http://microsoft.com/windows/mediaplayer/en/download/' id='mediaPlayer' name='mediaPlayer' displaysize='4' autosize='-1' bgcolor='#000065' showcontrols='true' showtracker='-1' showdisplay='0' showstatusbar='-1' videoborder3d='-1' style='width: 320px; height: 285px;' src='http://l.yimg.com/a/i/mntl/ww/06q3/yodel.swf' autostart='true' designtimesp='5311' loop='true' />")</script>
Yes, but this is against the whole POINT of validation. We might as well write out our page and use whatever code we please. Using standards compliant methods is a better option: It's perfectly possible to use the object tag to validly render Flash cross-browser.

Doctor_Varney
11-17-2008, 04:21 AM
I gotta ask... Does the page work?

Major Payne
11-18-2008, 04:11 AM
Yes, but this is against the whole POINT of validation. We might as well write out our page and use whatever code we please. Using standards compliant methods is a better option: It's perfectly possible to use the object tag to validly render Flash cross-browser.I only mentioned that you CAN get the embed tag validated as many people use BOTH the object tags and the embed tag. The use of JS to embed the one doesn't negate the use of the other at the same time.

Some problems arise depending on what you are embedding:


Deploying Applets for Specific Browsers -

When deploying applets:
For Internet Explorer only, use the object tag.
For the Mozilla family of browsers only, use the embed tag.


Source (http://java.sun.com/j2se/1.5.0/docs/guide/plugin/developer_guide/using_tags.html).

This does not hold I'm sure for all IE/Mozilla browsers today, but the extra code is not that hard to implement. The only problem arises where a browser must use the embed tag and JavaScript has been turned off. But we all known how to give notice to viewers to turn it on.

_Aerospace_Eng_
11-18-2008, 05:06 AM
That article was also published about 5 years ago. J2SE v1.5.0 came out around August of 2004. An article that explains how to use object tags for items that you are embedding is here: http://alistapart.com/articles/byebyeembed

Doctor_Varney
11-18-2008, 09:41 AM
What does "post count padding" mean?

If someone has something to say, why don't they just say it? :D

*shakes head*.

Major Payne
11-18-2008, 01:58 PM
That article was also published about 5 years ago. J2SE v1.5.0 came out around August of 2004. An article that explains how to use object tags for items that you are embedding is here: http://alistapart.com/articles/byebyeembedBeen there, read that ages ago. Refers to a different media type and not Java Applets. Guess my posts meet "post count padding", huh?

_Aerospace_Eng_
11-18-2008, 02:51 PM
If you want java applets, here you go: http://ww2.cs.fsu.edu/~steele/XHTML/appletObject.html



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum