SitePoint Sponsor

User Tag List

Results 1 to 14 of 14
  1. #1
    SitePoint Evangelist
    Join Date
    Aug 2005
    Posts
    574
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    XHTML and embed tags

    Hi,

    I'm redoing a site that has some Flash movies and also a Java applet and am trying to figure out how to make them validate. At first I was trying XHTML strict but was having so many problems that I decided to switch to XHTML transitional. My applet validates now but the Flash movies still don't. Basically, it looks like it doesn't like the embed tag. The specific errors listed are:

    Below are the results of checking this document for XML well-formedness and validity.

    1. Error Line 107 column 14: there is no attribute "src".

    <embed src="../_psychology-movies/abusechild2.swf" quality="high" pluginspage

    You have used the attribute named above in your document, but the document type you are using does not support that attribute for this element. This error is often caused by incorrect use of the "Strict" document type with a document that uses frames (e.g. you must use the "Transitional" document type to get the "target" attribute), or by using vendor proprietary extensions such as "marginheight" (this is usually fixed by using CSS to achieve the desired effect instead).

    This error may also result if the element itself is not supported in the document type you are using, as an undefined element will have no supported attributes; in this case, see the element-undefined error message for further information.

    How to fix: check the spelling and case of the element and attribute, (Remember XHTML is all lower-case) and/or check that they are both allowed in the chosen document type, and/or use CSS instead of this attribute. If you received this error when using the <embed> element to incorporate flash media in a Web page, see the FAQ item on valid flash.


    2. Error Line 107 column 62: there is no attribute "quality".

    ...logy-movies/abusechild2.swf" quality="high" pluginspage="http://www.macromedi


    3. Error Line 107 column 81: there is no attribute "pluginspage".

    ...ild2.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashpl


    4. Error Line 107 column 132: there is no attribute "type".

    ...cromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="1


    5. Error Line 107 column 170: there is no attribute "width".

    ...application/x-shockwave-flash" width="180" height="195"></embed>


    6. Error Line 107 column 183: there is no attribute "height".

    ...-shockwave-flash" width="180" height="195"></embed>


    7. Error Line 107 column 188: element "embed" undefined.

    ...kwave-flash" width="180" height="195"></embed>

    You have used the element named above in your document, but the document type you are using does not define an element of that name. This error is often caused by:
    * incorrect use of the "Strict" document type with a document that uses frames (e.g. you must use the "Frameset" document type to get the "<frameset>" element),
    * by using vendor proprietary extensions such as "<spacer>" or "<marquee>" (this is usually fixed by using CSS to achieve the desired effect instead).
    * by using upper-case tags in XHTML (in XHTML attributes and elements must be all lower-case.
    I found a site that gives workarounds for stuff like this (here, if you're interested). When I changed my code to what they recommended, it did validate but it did it by leaving out the embed tag and also the line that checks to see if the user agent has the Flash movie player installed and offers a download link if they don't. I'm concerned that if I leave out those two things that Netscape and Mozilla users won't be able to see the movies (no embed tag) and also that people who don't have Shockwave installed won't get the prompt. Have you guys run across this? Any suggestions about what to do to fix it?

  2. #2
    Programming Team silver trophybronze trophy
    Mittineague's Avatar
    Join Date
    Jul 2005
    Location
    West Springfield, Massachusetts
    Posts
    17,290
    Mentioned
    198 Post(s)
    Tagged
    3 Thread(s)

    standards

    Yes, it's a problem. The standards for XHTML strict have deprecated things that browsers that don't support XHTML need. So you have to make choices, don't write valid mark-up, write valid XHTML and leave some browsers out, write valid HTML, or not use certain elements.
    IMHO the best solution is to provide a link to the file. When and if the user wants it, their plugin should then open it.
    EDIT: Oh yeah, and another choice. You can "cheat" the validator

  3. #3
    SitePoint Evangelist
    Join Date
    Aug 2005
    Posts
    574
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ok. You got my attention. How does one "cheat" the validator????

  4. #4
    Is Still Alive silver trophybronze trophy RetroNetro's Avatar
    Join Date
    Jul 2003
    Location
    Texas
    Posts
    6,883
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by tryin_to_learn View Post
    Ok. You got my attention. How does one "cheat" the validator????
    http://blog.deconcept.com/swfobject/

  5. #5
    SitePoint Wizard bronze trophy C. Ankerstjerne's Avatar
    Join Date
    Jan 2004
    Location
    The Kingdom of Denmark
    Posts
    2,702
    Mentioned
    7 Post(s)
    Tagged
    0 Thread(s)
    Cheating the validator makes no sense at all. If you're not going to write valid code, why bother trying to make it look like you are? The code won't actually be valid, you'll just be using a shortcoming in the validator so that it appears to be.
    Christian Ankerstjerne
    <p<strong<abbr/HTML/ 4 teh win</>
    <>In Soviet Russia, website codes you!

  6. #6
    SitePoint Evangelist
    Join Date
    Aug 2005
    Posts
    574
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by C. Ankerstjerne View Post
    Cheating the validator makes no sense at all. If you're not going to write valid code, why bother trying to make it look like you are? The code won't actually be valid, you'll just be using a shortcoming in the validator so that it appears to be.
    I understand your point. However, I don't much like any of the other options for this particular site, either. Here's a link to one of the pages I'm talking about. What would you guys do with it?

    http://shrink-art.com/_newSite/abuse...-questions.php

    I suppose I could change the doctype and the validator link at the bottom for the pages on the site that have the movies, but it seems a bit weird to have a site with more than one doctype. Are there any good solutions here or is it a matter of choosing among the less than optimal choices?

  7. #7
    In memoriam gold trophysilver trophybronze trophy Dan Schulz's Avatar
    Join Date
    May 2006
    Location
    Aurora, Illinois
    Posts
    15,476
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Check out www.alistapart.com/articles/byebyeembed and www.alistapart.com/articles/flashsatay for information on how to use the OBJECT element properly (note: the Flash Satay method needs some work to ensure accessibility - for starters, I recommend nesting an image in case the Flash file does not load, then using version sniffing in the Flash container/pre-loader file).

  8. #8
    SitePoint Wizard bronze trophy C. Ankerstjerne's Avatar
    Join Date
    Jan 2004
    Location
    The Kingdom of Denmark
    Posts
    2,702
    Mentioned
    7 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by tryin_to_learn View Post
    However, I don't much like any of the other options for this particular site, either.
    [...]
    I suppose I could change [...] the validator link at the bottom for the page [...]
    If your code is invalid, as is the case here (even though the validator says it is, due to deceptive measures), don't brag about it being valid. In fact, I wouldn't brag about it at all - it takes up internet real estate, it is completely irrelevant to the users and I personally always get the image of a small child bragging when I see a validator link (especially on a non-webdesign-related page). How many large, professional companies (financial institutions, international indutrial groups, etc.) do you see having validator links on their websites?

    Anyone who could be interested in a page's validity will be quite capable of checking it themselves.
    Christian Ankerstjerne
    <p<strong<abbr/HTML/ 4 teh win</>
    <>In Soviet Russia, website codes you!

  9. #9
    SitePoint Evangelist
    Join Date
    Aug 2005
    Posts
    574
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Smile

    Quote Originally Posted by Dan Schulz View Post
    Check out www.alistapart.com/articles/byebyeembed and www.alistapart.com/articles/flashsatay for information on how to use the OBJECT element properly (note: the Flash Satay method needs some work to ensure accessibility - for starters, I recommend nesting an image in case the Flash file does not load, then using version sniffing in the Flash container/pre-loader file).
    Excellent suggestions, Dan. I have some reading to do! This is exactly the kind of info I was looking for. Thanks for your help.

  10. #10
    SitePoint Evangelist
    Join Date
    Aug 2005
    Posts
    574
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by C. Ankerstjerne View Post
    I personally always get the image of a small child bragging when I see a validator link (especially on a non-webdesign-related page). How many large, professional companies (financial institutions, international indutrial groups, etc.) do you see having validator links on their websites?

    Anyone who could be interested in a page's validity will be quite capable of checking it themselves.
    I see it a bit differently, Christian. My sense is that if I put up validation links on sites I build, then more and more clients will begin inquiring about it and demanding that the sites we build for them validate. So I see it more as education and my own small way of nudging the industry toward good coding practices. I don't much like the rather large icons the W3C provides, but an unobtrusive link doesn't offend me.

  11. #11
    In memoriam gold trophysilver trophybronze trophy Dan Schulz's Avatar
    Join Date
    May 2006
    Location
    Aurora, Illinois
    Posts
    15,476
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Or you can simply code your pages to validate and not tell the clients. Or better yet, code them to validate then give the client the option of having the validation links on their site.

  12. #12
    SitePoint Wizard bronze trophy C. Ankerstjerne's Avatar
    Join Date
    Jan 2004
    Location
    The Kingdom of Denmark
    Posts
    2,702
    Mentioned
    7 Post(s)
    Tagged
    0 Thread(s)
    Unless you give your clients a good reason for the code to be valid, they won't care. Don't expect them to look at the bottom of the websites, and suddenly wonder 'What is this whatchamacallit-ation', and go investagate it. Actively give them arguments for why they should opt for websites with valid code.
    Christian Ankerstjerne
    <p<strong<abbr/HTML/ 4 teh win</>
    <>In Soviet Russia, website codes you!

  13. #13
    SitePoint Evangelist
    Join Date
    Aug 2005
    Posts
    574
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Interesting points of view. Actually, I'm a student in Interactive Media Design beginning to work on my portfolio and this is one of the sites I'm planning to include. We're encouraged to put links like this on our work -- but maybe that's just because we're design students.

  14. #14
    SitePoint Wizard bronze trophy C. Ankerstjerne's Avatar
    Join Date
    Jan 2004
    Location
    The Kingdom of Denmark
    Posts
    2,702
    Mentioned
    7 Post(s)
    Tagged
    0 Thread(s)
    He he - sounds like your teachers are more focussed on code than on users.
    Christian Ankerstjerne
    <p<strong<abbr/HTML/ 4 teh win</>
    <>In Soviet Russia, website codes you!


Bookmarks

Posting Permissions

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