Just a slight XHTML problem...

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
Gen-ik
DevNet Resident
Posts: 1059
Joined: Mon Aug 12, 2002 7:08 pm
Location: London. UK.

Just a slight XHTML problem...

Post by Gen-ik »

Er, I'm probably not the first person to run into this XHTML 'glitch' so I'm hoping someone knows a work-a-round for it.

Putting a Flash movie into a webpage requires both the <embed> and <object> tags for different browsers. IE uses the <object> tag while NS uses the <embed> tag.

Now the problem is that XHTML doesn't allow the use of the <embed> tag.. which means any browsers that use/need it won't be able to display Flash movies in an XHTML document.

Is there a replacement for the <embed> tag or has the God of XHTML just cocked things up big time?
m3rajk
DevNet Resident
Posts: 1191
Joined: Mon Jun 02, 2003 3:37 pm

Post by m3rajk »

nope. embed was deprecated in 4.0

it was moved to object. netscape 7, mozilla from something earlier than 1.3 all use object. mozilla is the only one i know that actually supports all deprecated as well. mozilla likes to be nice to everyone i guess.
microthick
Forum Regular
Posts: 543
Joined: Wed Sep 24, 2003 2:15 pm
Location: Vancouver, BC

Post by microthick »

Use JavaScript to document.write the needed code for embed. It'll pass through validation fine.
Gen-ik
DevNet Resident
Posts: 1059
Joined: Mon Aug 12, 2002 7:08 pm
Location: London. UK.

Post by Gen-ik »

microthick wrote:Use JavaScript to document.write the needed code for embed. It'll pass through validation fine.
Yes but that defeats the whole purpose of writing an XHTML document. It's not just about the validation it's wether or not the document IS a valid XHTML document, not just a hack job.

Anyway as far as I know if you have the correct document type and headers so that your document is a true XHTML document then things like the <embed> tag won't work anyway, regardless of how you get them into the document.
User avatar
nigma
DevNet Resident
Posts: 1094
Joined: Sat Jan 25, 2003 1:49 am

Post by nigma »

After reading this post I found this article, it might help?
http://www.alistapart.com/articles/flashsatay/
microthick
Forum Regular
Posts: 543
Joined: Wed Sep 24, 2003 2:15 pm
Location: Vancouver, BC

Post by microthick »

Gen-ik wrote:
microthick wrote:Use JavaScript to document.write the needed code for embed. It'll pass through validation fine.
Yes but that defeats the whole purpose of writing an XHTML document. It's not just about the validation it's wether or not the document IS a valid XHTML document, not just a hack job.

Anyway as far as I know if you have the correct document type and headers so that your document is a true XHTML document then things like the <embed> tag won't work anyway, regardless of how you get them into the document.
rofl.

css and xhtml is all about the hacks, dude.

until we rid the world of ns4, ie5, and all ie's on mac, people will forever be using hacks to make their work display properly.
Gen-ik
DevNet Resident
Posts: 1059
Joined: Mon Aug 12, 2002 7:08 pm
Location: London. UK.

Post by Gen-ik »

nigma wrote:After reading this post I found this article, it might help?
http://www.alistapart.com/articles/flashsatay/
Aha you is d'man :) Works great.
Thanks mate.


See Mircothick, there are ways of working with XHTML and CSS that don't require any nasty and 'non-standard' hacks... just takes a bit of brain work, patience, and Googling ;)

Code: Select all

<object type="application/x-shockwave-flash
data="c.swf?path=movie.swf" 
width="400" height="300">
<param name="movie" 
value="c.swf?path=movie.swf" />
</object>
m3rajk
DevNet Resident
Posts: 1191
Joined: Mon Jun 02, 2003 3:37 pm

Post by m3rajk »

microthick wrote:until we rid the world of ns4, ie5, and all ie's on mac, people will forever be using hacks to make their work display properly.
only one way to do that is to stop writing for netscape 4.x (which is being done since it has end-of-life so places that make those special software that held things up have moved to mozilla1.3.1/ie5.5) and i'm not gonna get into the mac part of that...
microthick
Forum Regular
Posts: 543
Joined: Wed Sep 24, 2003 2:15 pm
Location: Vancouver, BC

Post by microthick »

unfortunately, the MegaSuperInternet Corp. that I work for still makes us program web stuff so that it works for ns4.61, ie5.5, and ns7.02, so i'm always having to compromise.

my personal stuff ensures that things work properly on ns4, but usually just so that it works... like you said, the only way we're gonna get rid of ns4 is by stopping programming for it.
Post Reply