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
    New Coder
    Join Date
    Feb 2010
    Location
    Whitley Bay, UK
    Posts
    46
    Thanks
    9
    Thanked 0 Times in 0 Posts

    Validation problems

    I have managed to get all my pages validated with xhtml 1.0 strict, which pleased me.

    Now I wanted to add the free recycle widget, obtained from Recyclenow

    The code they supply is

    Code:
    <object width="170" height="545"><param name="movie" value="http://www.recyclenow.com/swf/recyclenow_08/SidebarWidget.swf"></param><param name="allowscriptaccess" value="always"></param>
    <param name="flashvars" value="widgetBackgroundColor=FFFFFF"></param><embed src="http://www.recyclenow.com/swf/recyclenow_08/SidebarWidget.swf" type="application/x-shockwave-flash" allowscriptaccess="always" width="170" height="545" flashVars="widgetBackgroundColor=FFFFFF"></embed><p>Find out what you can recycle at <a href="http://www.recyclenow.com">Recyclenow</a></p></object>
    However, this causes severel errors to appear when I try to validate the page.

    Is there anything I can do ?

  • #2
    Senior Coder effpeetee's Avatar
    Join Date
    Feb 2007
    Location
    Clapham Junction - London SW
    Posts
    4,885
    Thanks
    228
    Thanked 204 Times in 203 Posts
    We need to see more code. The choice of Doctype can influence the validation.

    A link would be the best way.

    Frank
    * Sources (updated: 21.11.2012.
    Using Windows 8 Professional. 64bit with HP Photosmart 5510 printer Very useful site here.

  • #3
    Senior Coder coothead's Avatar
    Join Date
    Jan 2004
    Location
    chertsey, a small town 25 miles south west of london, england.
    Posts
    1,743
    Thanks
    0
    Thanked 244 Times in 239 Posts
    Hi there Williebee,

    it is the propriety embed element that causes validation failure.

    Try it like this...
    Code:
    
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
       "http://www.w3.org/TR/html4/strict.dtd">
    <html lang="en">
    <head>
    
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <meta name="language" content="english"> 
    <meta http-equiv="Content-Style-Type" content="text/css">
    
    <title></title>
    
    </head>
    <body>
    
    <div>
    
    <object type="application/x-shockwave-flash" data="http://www.recyclenow.com/swf/recyclenow_08/SidebarWidget.swf" width="170" height="545">
     <param name="movie" value="http://www.recyclenow.com/swf/recyclenow_08/SidebarWidget.swf">
     <param name="allowscriptaccess" value="always">
     <param name="flashvars" value="widgetBackgroundColor=ffffff">
    
    <p>Find out what you can recycle at <a href="http://www.recyclenow.com">Recyclenow</a></p>
    
    </object>
    
    </div>
    
    </body>
    </html>	
    
    coothead

  • Users who have thanked coothead for this post:

    Williebee (05-18-2010)

  • #4
    New Coder
    Join Date
    Feb 2010
    Location
    Whitley Bay, UK
    Posts
    46
    Thanks
    9
    Thanked 0 Times in 0 Posts
    Many thanks 'Coothead'

    I am not at home now but have had a quick play about with the code you provided and everything seems to work well. I can name the containing div and position it as I want.

    On validation, it's 100% .. I never thought about trying a different DOC type.

    Just one thing, is there any way I can get rid of the rounded corners, as I was initially intending to put this on a dark background. Colouring in the div doesn't work.

    (ps I remember Chertsey well. I camped there many years ago with my parents, also at the lovely Laleham site nearby)

    Effpeetee

    Thank you for your reply too, but I think Coothead has sorted everything out.

  • #5
    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
    Just change the widgetBackgroundColor to the color of your choice. And it wasn't the doctype that fixed the issue. It was removing the embed tag although I recommend you look into SWF Object 2.0.
    ||||If you are getting paid to do a job, don't ask for help on it!||||

  • #6
    Senior Coder coothead's Avatar
    Join Date
    Jan 2004
    Location
    chertsey, a small town 25 miles south west of london, england.
    Posts
    1,743
    Thanks
    0
    Thanked 244 Times in 239 Posts
    Hi there Williebee,

    change the highlighted value...
    Code:
    
     <param name="flashvars" value="widgetBackgroundColor=ffffff">
    
    ...to match your background-color value.

    coothead

    p.s. I am pleased that my home town gave you so much pleasure.


  •  

    Posting Permissions

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