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 6 of 6
  1. #1
    Regular Coder
    Join Date
    Nov 2008
    Posts
    317
    Thanks
    159
    Thanked 0 Times in 0 Posts

    Validator problems

    I just inserted a flash music player SWFObject w/ javascript and I got some new errors in the W3 validator. Don't pay any attention to any errors before line 40 they are all after it. It seems to be a problem with the tags.. Is my SWFObject up to date? How can I fix these errors? Here's the validator page for my website. Thanks so much!
    durkmusicbeats . com

  • #2
    Regular Coder
    Join Date
    Nov 2008
    Posts
    317
    Thanks
    159
    Thanked 0 Times in 0 Posts
    Please? Any help with this?
    durkmusicbeats . com

  • #3
    Regular Coder
    Join Date
    Nov 2008
    Posts
    317
    Thanks
    159
    Thanked 0 Times in 0 Posts
    This forum use to be so helpful
    durkmusicbeats . com

  • #4
    Senior Coder rangana's Avatar
    Join Date
    Feb 2008
    Location
    Cebu City, Philippines
    Posts
    1,752
    Thanks
    65
    Thanked 372 Times in 365 Posts
    You might find these list useful:

    1. You are serving your page as HTML, and not XHTML. So no need for the self-close of tags:
      Line 36:
      Code:
      <img src="http://members.tripod.com/adm/img/common/ot_noscript.gif?rand=887748" alt="" width="1" height="1" />
      ...remove highlighted.

    2. Change & into: &amp;:
      Code:
       <iframe frameborder="0" marginwidth="0" marginheight="0" scrolling="no" width="728" height="90" src="http://ad.yieldmanager.com/st?ad_type=iframe&ad_size=728x90&section=209094"></iframe>
    3. Your CDATA island is erroneous.
      This part:
      Code:
      // <![CDATA[
      .
      .
      .
      // ]]>

      ...should be:
      Code:
      /* <![CDATA[ */
      .
      .
      .
      /* ]]> */

      ...but there's no need to surround your JS with CDATA islands since you're just serving your page as HTML.

      It's better to make this script:
      Code:
      <script type="text/javascript">
      	var so = new SWFObject("ep_player.swf", "ep_player1", "269", "25", "9", "#FFFFFF");
      	so.addVariable("skin", "skin.xml");
      	so.addVariable("file", "<location>http://boxstr.com/files/4635076_hklnx/America%20%28w%20Hook%29.mp3</location><creator>DurkMusic Productions</creator><title>Title of Song</title>)"; 
      	so.addVariable("autoplay", "false");
      	so.addVariable("shuffle", "false");
      	so.addVariable("buffertime", "1");
      	so.write("flashcontent1");
      
      </script>
      ...an external script - will save you validation flaws.

    4. ...and lastly, have a read on deprecated tags and attributes.


    Hope that keeps you going.
    Learn how to javascript at 02geek

    The more you learn, the more you'll realize there's much more to learn
    Ray.ph

  • #5
    Regular Coder
    Join Date
    Nov 2008
    Posts
    317
    Thanks
    159
    Thanked 0 Times in 0 Posts
    Thanks but taking out the CDATA didn't work

    and don't forget... I can't change anything from line 40 up so just ignore those errors...
    durkmusicbeats . com

  • #6
    Senior Coder
    Join Date
    Oct 2008
    Location
    Long Beach
    Posts
    1,196
    Thanks
    36
    Thanked 164 Times in 164 Posts
    Hey rangana, can you explain your #3? I've always used the "erroneous" method to comment out CDATA islands for JS - I wouldn't mind knowing why that's incorrect.
    Feel free to e-mail me if I forget to respond ;)
    ohsosexybrit@gmail.com


  •  

    Posting Permissions

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