Wrox Programmer Forums
|
HTML Code Clinic Do you have some HTML code you'd like to share and get suggestions from others for tweaking or improving it? This discussion is the place.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the HTML Code Clinic section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 19th, 2004, 03:46 PM
Friend of Wrox
 
Join Date: Nov 2003
Posts: 1,285
Thanks: 0
Thanked 2 Times in 2 Posts
Default Alternative to <embed>

Here's the problem: I want to make a 100% valid HTML Transitional page. I am using the official w3 validator as my reference. The banner of my page consists of a Flash movie and some text under it.

When I get w3 to process my page, it comes back saying that the <embed> attribute is not supported. I've always <embed>ed my Flash movies, and it works fine, but it seems <embed> is not part of official HTML.

Does anyone know a way around this, or will I have to forget the whole "valid HTML" thing?

Thanks in advanced.

Snib

<><
__________________
-Snib - http://www.snibworks.com
Where will you be in 100 years?
 
Old June 19th, 2004, 04:12 PM
richard.york's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 1,706
Thanks: 0
Thanked 6 Times in 6 Posts
Default

The <embed> tag was deprecated in favor of the <object> tag. The syntax is available here:
http://www.macromedia.com/support/fl...ts/tn4150.html
http://www.macromedia.com/support/fl...attributes.htm

HTH!

Regards,
Rich

::::::::::::::::::::::::::::::::::::::::::
The Spicy Peanut Project
http://www.spicypeanut.net
::::::::::::::::::::::::::::::::::::::::::
 
Old June 19th, 2004, 04:13 PM
richard.york's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 1,706
Thanks: 0
Thanked 6 Times in 6 Posts
Default

BTW: These are often used in combination with one another for BC with older browsers. You can omit the <embed> tag and probably be alright.

Actually I don't think <embed> was ever part of the standards, it was used in NN 4.. I think NN 6 and newer support the <object> tag syntax. So if NN4 matters to you keep the <embed> tag, if not, ditch it.

Regards,
Rich

::::::::::::::::::::::::::::::::::::::::::
The Spicy Peanut Project
http://www.spicypeanut.net
::::::::::::::::::::::::::::::::::::::::::
 
Old June 19th, 2004, 04:19 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 425
Thanks: 0
Thanked 3 Times in 3 Posts
Default

Here you go.
http://www.alistapart.com/articles/flashsatay/

(o<
//\ =^..^=
 
Old June 19th, 2004, 04:24 PM
richard.york's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 1,706
Thanks: 0
Thanked 6 Times in 6 Posts
Default

Sorry, posted prematurely.. have a look at my edited replies. The <embed> tag is included for use with NN4.. so using the links I posted use the <object> syntax omitting the <embed> tag. Make sense? The alistapart article meow posted puts it best.

Regards,
Rich

::::::::::::::::::::::::::::::::::::::::::
The Spicy Peanut Project
http://www.spicypeanut.net
::::::::::::::::::::::::::::::::::::::::::
 
Old June 19th, 2004, 04:24 PM
Friend of Wrox
 
Join Date: Nov 2003
Posts: 1,285
Thanks: 0
Thanked 2 Times in 2 Posts
Default

Thanks to Rich and meow.

I omitted the <embed> element, and it works great. It seems that <embed> indeed never was part of the standards, just Netscape's way of embedding media that they don't even use anymore.

Does NN4 matter to me? Not at all (sorry to the three people that still use it :D j/k).

Thanks again.

Snib

<><
 
Old June 19th, 2004, 04:28 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 425
Thanks: 0
Thanked 3 Times in 3 Posts
Default

Actually, the object syntax from alistapart works fine in Netscape 4. If you just use the object code from MM as it is I don't think it will work in anything else than IE and it won't validate.

(o<
//\ =^..^=
 
Old June 19th, 2004, 04:38 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 425
Thanks: 0
Thanked 3 Times in 3 Posts
Default

Because you use EMBED.

Scrap what I said about MM's object code not being valid. It is. But it only works in IE.

(o<
//\ =^..^=
 
Old June 19th, 2004, 04:56 PM
Friend of Wrox
 
Join Date: Mar 2004
Posts: 357
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to anshul
Default

I use this:

<DIV style="xxxxxxxxx"" class="xxxxx" id="xxxxx">
<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
width="xx" height="xx" bgColor="#xxxxxx">
<PARAM name="movie" value="../xxx/xx_xxx.swf">
<PARAM name="quality" value="autolow">
<PARAM name="bgColor" value="#xxxxxx">
<PARAM name="loop" value="x">
<EMBED src="../xxx/xx_xxx.swf" quality="autolow" loop="x"
    type="application/x-shockwave-flash" width="xx" height="xx"
    bgColor="#xxxxx">
</EMBED>
</OBJECT>
</DIV>

This works always good in MSIE 5, 6 Netscape 4, 4.8, 6, 7.1 | Opera 3, 5, 6 | Mozilla 1.6

U may use additional attributes like 'pluginspace'/'codebase' to
let users prompt flash player download, but this slows web page
loading for them, hence I don't.



add
---

i suspect asp request/response more slower than 56kbps dial-up i use. still i wonder how a yahoo java chat applet is so instantaneos!

<OBJECT> is mss' impel, w3cs' spec, better than older netscapes'
<EMBED> , but still if above line of <EMBED> is dropped, lower ones in above listed h've problesms, i've seen, though mise performs.
but still html is like english, we can use it as we like, our pages should work!

..
 
Old June 19th, 2004, 05:03 PM
richard.york's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 1,706
Thanks: 0
Thanked 6 Times in 6 Posts
Default

Anshul: How many times do you need to post your "solution"?? This is the third time you've posted! If you aren't comfortable with your post, just edit it ;).

Regards,
Rich

::::::::::::::::::::::::::::::::::::::::::
The Spicy Peanut Project
http://www.spicypeanut.net
::::::::::::::::::::::::::::::::::::::::::





Similar Threads
Thread Thread Starter Forum Replies Last Post
Ch 8: <asp:image> inside <a> & ext.CSS (pg. 274) epc BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 1 July 12th, 2008 04:37 AM
<style> tags in a <body> vs. <div> bcat BOOK: Beginning CSS: Cascading Style Sheets for Web Design ISBN: 978-0-7645-7642-3 1 March 27th, 2005 08:50 AM
<marquee><b>About CHAT App. in PHP4</b></marquee> Ramkrishna PHP How-To 1 September 11th, 2004 07:01 AM
<STRONG> vs <B> and <EM> vs <I> anshul HTML Code Clinic 12 September 1st, 2004 05:22 PM
a problem in book<<beginning asp.net using vb>> luoware ASP.NET 1.0 and 1.1 Basics 3 December 8th, 2003 09:32 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.