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
    Apr 2008
    Posts
    46
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Converting <embed> to <object>

    Code:
    <embed type="application/x-shockwave-flash" src="/3/flash/h1.swf" style="" bgcolor="#F4F9FF" quality="high" flashvars="link=LinkURL&amp;txtName=login" height="29" width="250">
    										</div>
    Hwo can I convert this so it validates in xhtml strict?

  • #2
    Senior Coder
    Join Date
    Jan 2005
    Location
    Memphis, TN
    Posts
    1,798
    Thanks
    8
    Thanked 131 Times in 129 Posts
    embed and object won't validate. Use the swfobject method instead:
    http://blog.deconcept.com/swfobject/
    Stop making things so hard on yourself.
    i is tugbucket :: help raise tugburg :: Whitehaven Kiwanis

  • #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
    Quote Originally Posted by harbingerOTV View Post
    embed and object won't validate. Use the swfobject method instead:
    http://blog.deconcept.com/swfobject/
    Object will validate but I agree its better to use swfobject however there is a newer version out. The link posted is to version 1.5 but the latest version is 2.0.

    http://code.google.com/p/swfobject/
    ||||If you are getting paid to do a job, don't ask for help on it!||||

  • #4
    The Apostate Apostropartheid's Avatar
    Join Date
    Oct 2007
    Posts
    3,215
    Thanks
    16
    Thanked 265 Times in 263 Posts
    I would third SWFObject, but I've found that a simple object will do the trick most of the time.
    Code:
    <object type="application/x-shockwave-flash" data="/3/flash/h1.swf" height="29" width="250">
     <param name="bgcolor" value="#F4F9FF"/>
     <param name="quality" value="high"/>
     <param name="flashvars" value="link=LinkURL&amp;txtName=login"/>
    </object>

  • #5
    The fat guy next door VIPStephan's Avatar
    Join Date
    Jan 2006
    Location
    Halle (Saale), Germany
    Posts
    8,877
    Thanks
    6
    Thanked 1,035 Times in 1,008 Posts
    SWFobject is better in terms of progressive enhancement, though.

  • #6
    Regular Coder
    Join Date
    Aug 2005
    Location
    MS
    Posts
    845
    Thanks
    11
    Thanked 79 Times in 77 Posts
    Quote Originally Posted by JaymeNYC View Post
    Code:
    <embed type="application/x-shockwave-flash" src="/3/flash/h1.swf" style="" bgcolor="#F4F9FF" quality="high" flashvars="link=LinkURL&amp;txtName=login" height="29" width="250">
    										</div>
    Hwo can I convert this so it validates in xhtml strict?
    Insert your embed tag info inside JS and it will validate. Just remember the inherent problem that viewers may have JS turned off and you may want to add noscript tags to warn them to turn JS on.

    Example:
    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>
    ☠ ☠RON☠ ☠


  •  

    Posting Permissions

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