by-expession

Expression Web Resources

Validation: Amazon Links and Browser Problems with Cmap & DOCTYPE

Latest post 12-11-2007 12:31 PM by Tina. 2 replies.
  • 09-30-2007 11:57 AM

    Validation: Amazon Links and Browser Problems with Cmap & DOCTYPE

    I've spent a great deal of time redesigning my website <URL: http://www.enfolded.info > and trying to make it W3C compliant (HTML 4.01 Transitional and, XHTML 1.0 Transitional). I worked to the XHTML standard on all pages except those that had imported code (e.g., Amazon links and Cmaps).

    I. Amazon Links

    Amazon book links, of course, have code required to pass on information about the books; and the number 
    of errors generated by the validator are numerous: e.g., for a page with only three book links, <URL:
    http://www.enfolded.info/references/bio.htm >, the validator generates 44 errors.Some reference pages
    generate 250 or more! Here's an example of one for the error messages:

    =======
    Line 62, Column 97: general entity "o" not defined and no default entity.
    …m.amazon.com/e/cm?t=unfoldingthee-20&o=1&p=8&l=as1&asins=0975991477&fc1=00000

    This is usually a cascading error caused by a an undefined entity reference or use of an unencoded
    ampersand (&) in an URL or body text. See the previous message for further details.
    =======

    I don't see any point is wasting time trying to clean up these pages. I'll just leave the validation
    link off those pages. Any arguments for doing otherwise?

    II. Cmaps

    As doe Cmaps, the code generated by Cmaps Tools does not even meet the 4.01 standard (and the developers have stated they have no plans to do so). However, I was able to create a .DWT that handled most of the common code I corrected, requiring that I manually clean up the code specific to each Cmap primarily for image areas and links. You can see what I'm talking about by looking at the source code for the Simple Cmap Example which is linked to via the Cmap Tools image on my About page: <URL: http://www.enfolded.info/about.htm >.

    Furthermore, I must omit the DOCTYPE code for the Cmap popups to work properly in Firefox and IE7 (but working OK in Opera). You can see what happens with Cmaps when a DOCTYPE is present at <URL: http://www.enfolded.info/_not_indexed/Cmaps/validation/ue_fig_01broken.htm >: In Firefox the popups always appear in upper left corner of the window, In IE7, popup location is sensitive to scrolling, moving away from the correct location as the window is scrolled, horizontally or vertically. It's a javascript coding problem, but I don't know enough about javascript and DOMs to correct the code. Can anyone help with fixing the javascript code?

    III. Feedback Appreciated

    Feedback on the website and pages would be appreciated. I'm still working to improve the CSS and,
    of course, adding more content as time allows.

    -Tom


  • 10-25-2007 10:18 PM In reply to

    • cdwise
    • Top 10 Contributor
    • Joined on 12-22-2006
    • Houston, TX
    • Posts 541

    Re: Validation: Amazon Links and Browser Problems with Cmap & DOCTYPE

    Sorry, this came in while I was out of town and missed the post until today.

    When it comes to validation errors in third party code, especially affiliate links like amazon there is little you can do about it. The way I handle it is that what is under my control will validate unless I have a good strong reason usually to do with usability and what I do not control is left alone. Personally I think you are wise to stick to html 4.01 for this particular site.

    Its a pragmatic approach but one that works for me.

    Regarding your Cmaps issue, I don't know what to tell you if the people who created it won't support it properly. From what you say it relies on quirks mode to work (that's what the absense of a doctype does - thow's the page into legacy rendering). My suggestion would be to look for a similar program that does support current standards.

    As for your site's design, I'd center it in the page but the only way to do that in quirks mode would be to wrap your "all" div in a <center> tag (for legacy rendering) and add text-align: left to the "all" definition along with margin: 0 auto; to center it in more standards compliant browsers..

    I wish I had a better solution to offer you.

    Cheryl D Wise MS MVP Expression Instructor: starttoweb.com

  • 12-11-2007 12:31 PM In reply to

    • Tina
    • Top 10 Contributor
    • Joined on 12-22-2006
    • UK
    • Posts 45

    Re: Validation: Amazon Links and Browser Problems with Cmap & DOCTYPE

    With affliate links that don't conform to code ...I do a 301 redirect. I put the link on a blank page then do a 301 redirect from that page to the affliate link.... the link I link to within my pages is the one on my site .. which redirects (seo friendly) by the 301 redirect to the affliate link..... sorted no problems just a little time. Also because your using links within your own site your cutting down on external links within your own site which also helps on the seo front. Keyword phrase the link.... the reason I put the link on the page is so that should the 301 fail for any reason people can still click on the link to get to the affliate location. You have to use a 301 redirect though ... using a meta redirect will harm your site not enhance it on the seo front. (search engine optimsation)

     

    Tina

    Filed under: ,
Page 1 of 1 (3 items) | RSS
Powered by Community Server (Commercial Edition), by Telligent Systems Sponsored by: Start to Web
@ 2005-2008 Cheryl D Wise