Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 12 of 12
  1. #1
    New to the CF scene
    Join Date
    Aug 2008
    Location
    Netherlands
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    I'm trying to validate a page with an flv player in it

    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
    Code:
    script language='javascript'
    had to be
    Code:
    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, the w3c errors here:
    w3c validation of videokunst.php
    and the file that is probably causing it all would be here: flash.php (if necessary I can of course put that code in a post, it won't open like this)

  • #2
    Senior Coder tomws's Avatar
    Join Date
    Nov 2007
    Location
    Arkansas
    Posts
    2,644
    Thanks
    29
    Thanked 330 Times in 326 Posts
    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:
    Code:
    <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:
    Code:
    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>
    Last edited by tomws; 11-14-2008 at 06:09 PM.

  • #3
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    How is any of this a php issue? PHP outputs html so this should be in the html/css forum.
    ||||If you are getting paid to do a job, don't ask for help on it!||||

  • #4
    God Emperor Fou-Lu's Avatar
    Join Date
    Sep 2002
    Location
    Saskatoon, Saskatchewan
    Posts
    16,980
    Thanks
    4
    Thanked 2,659 Times in 2,628 Posts
    Quote Originally Posted by _Aerospace_Eng_ View Post
    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.
    PHP Code:
    header('HTTP/1.1 420 Enhance Your Calm'); 

  • #5
    Regular Coder
    Join Date
    Aug 2005
    Location
    MS
    Posts
    821
    Thanks
    10
    Thanked 78 Times in 76 Posts
    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:
    Code:
    <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>
    Last edited by Major Payne; 11-16-2008 at 07:29 AM.
    ☠ ☠RON☠ ☠

  • #6
    The Apostate Apostropartheid's Avatar
    Join Date
    Oct 2007
    Posts
    3,215
    Thanks
    16
    Thanked 265 Times in 263 Posts
    Quote Originally Posted by Major Payne View Post
    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:
    Code:
    <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.

  • #7
    Regular Coder Doctor_Varney's Avatar
    Join Date
    Mar 2008
    Location
    Midlands, UK
    Posts
    649
    Thanks
    45
    Thanked 29 Times in 28 Posts
    I gotta ask... Does the page work?
    Last edited by Doctor_Varney; 11-17-2008 at 04:23 AM.
    Definition: Computer rage is a heightened physiological response with associated feelings of anger and frustration[1] resulting from using a computer or other complex electronic device. It may result in the physical assault of the computer or similar item.[2] Computer use often leads to verbal abuse and occasionally physical violence towards the object.[3] Computer rage may be caused by distress due to a hardware or software problem which the enraged person is unable to correct.

  • #8
    Regular Coder
    Join Date
    Aug 2005
    Location
    MS
    Posts
    821
    Thanks
    10
    Thanked 78 Times in 76 Posts
    Quote Originally Posted by CyanLight View Post
    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.

    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.
    ☠ ☠RON☠ ☠

  • #9
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    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
    ||||If you are getting paid to do a job, don't ask for help on it!||||

  • #10
    Regular Coder Doctor_Varney's Avatar
    Join Date
    Mar 2008
    Location
    Midlands, UK
    Posts
    649
    Thanks
    45
    Thanked 29 Times in 28 Posts
    What does "post count padding" mean?

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

    *shakes head*.
    Last edited by Doctor_Varney; 11-18-2008 at 10:12 AM.
    Definition: Computer rage is a heightened physiological response with associated feelings of anger and frustration[1] resulting from using a computer or other complex electronic device. It may result in the physical assault of the computer or similar item.[2] Computer use often leads to verbal abuse and occasionally physical violence towards the object.[3] Computer rage may be caused by distress due to a hardware or software problem which the enraged person is unable to correct.

  • #11
    Regular Coder
    Join Date
    Aug 2005
    Location
    MS
    Posts
    821
    Thanks
    10
    Thanked 78 Times in 76 Posts
    Quote Originally Posted by _Aerospace_Eng_ View Post
    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
    Been there, read that ages ago. Refers to a different media type and not Java Applets. Guess my posts meet "post count padding", huh?
    Last edited by Major Payne; 11-18-2008 at 02:01 PM.
    ☠ ☠RON☠ ☠

  • #12
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    If you want java applets, here you go: http://ww2.cs.fsu.edu/~steele/XHTML/appletObject.html
    ||||If you are getting paid to do a job, don't ask for help on it!||||


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •