[thelist] XHTML Strict with supplied code snippets (DART)

Hugh Miller hmiller at cfpress.co.uk
Thu Oct 30 05:49:59 CDT 2008


Hi all.

Firstly, this is probably my first post to the list in about 8 years. 
Apologies for the slackness, I got caught up in print design for a 
number of years and got back to web full time about 18 months ago. Been 
lurking on the list for a fair while since.

I'll pay a tip at the end of this in lieu of all the bandwidth I've had 
on the list with no reply.

So to the question:

----------------------------------------------------------------

The sites I am working on now use DART ad serving software to track and 
target ads for us. The default tag you are supplied with is not even 
XHTML Transistional compliant much less for a strict doctype. All of my 
pages are currently Transisitional but I expect to be relaunching with a 
strict doctype in a couple of months.

Here's pretty much the default tag DART creates for you:

<iframe src="http://ad.doubleclick.net/adi/mysite.co.uk/;dcopt=ist;sz=728x90;ord=1225356600?" width="728" height="90" marginwidth="0" marginheight="0" frameborder="0" scrolling="no">
<script language="JavaScript" src="http://ad.doubleclick.net/adj/mysite.co.uk/;dcopt=ist;sz=728x90;abr=!ie;ord=1225356600?" type="text/javascript"></script>
<noscript><a href="http://ad.doubleclick.net/jump/mysite.co.uk/;sz=728x90;abr=!ie4;abr=!ie5;abr=!ie6;ord=1225356600?" target="_blank"><img src="http://ad.doubleclick.net/ad/mysite.co.uk/;sz=728x90;abr=!ie4;abr=!ie5;abr=!ie6;ord=1225356600?" width="728" height="90" border="0" alt="" /></a></noscript>
</iframe>

My reworked XHTML strict tag would be along the lines of:

<!--[if IE]>
<object id="ldbMain" class="advertisement" classid="clsid:25336920-03F9-11CF-8FD0-00AA00686F13" data="http://ad.doubleclick.net/adi/mysite.co.uk/;dcopt=ist;sz=728x90;ord=1225360088?" width="728" height="90">
<p>UNKNOWN CONTENT AS YET</p>
</object>
<![endif]-->
<!--[if !IE]> <-->
<object id="ldbMain" class="advertisement" type="text/html" data="http://ad.doubleclick.net/adi/mysite.co.uk/;dcopt=ist;sz=728x90;ord=1225360088?" width="728" height="90">
<p>UNKNOWN CONTENT AS YET</p>
</object>
<!--> <![endif]-->

due to iframe being deprecated and because using the object tag is the 
w3c approved way of doing things. Where I get problems is that I am 
loading content I have no real control over. I am also aware that the 
linked code will not be XHTML strict and I may yet use a transitional 
doctype because of this, but would still prefer the html that I send out 
to be 100% validated.

I am aware that it might / should be possible to use a single object tag 
without IE conditionals. This code comes from reading 
http://aplus.rs/web-dev/insert-html-page-into-another-html-page/

This tag works in Firefox 3 with some styling to adjust the loaded 
element (simply negative margins). In IE6 / IE7 it refuses to load, 
instead you get a white box with inactive scrollbars. If you simply load 
the data="http://..." string in your browser you do get an ad (albeit 
with 10px borders, I can fix this using CSS so that is not an issue at all).

So my question is, has anyone else here attempted to regenerate valid 
tags for DART, or any other ad serving software?

Cheers
Hugh

TIP Below, creating a nested list table for endless depth site 
navigation / subsections.

--------------------------------------------------------------------------------------









<tip type="Backend">
EASY ENDLESS NAVIGATION DEPTH
----------------------------------------------

 You would like a site that could go quite easily from the top level to 
more than simply one level down.
 Some example URLs might be:
 http://www.yoursite.com/news/uk/scotland/glasgow/south/hampden/ (6 
levels in).

 A very easy to manage and to integrate even across a range of sites is 
to think on your database table as a nested list. To do this, allocate a 
'Parent ID' to your sections. Something like:

 ID 1 = News
 ID 1707 = UK (Parent ID = 1)
 ID 1297 = Scotland (Parent ID = 1707)
 ID 500 = Glasgow (Parent ID = 1297)
 ID 525 = South (Parent ID = 500)
 ID 550 = Hampden (Parent ID = 525)

Numbers mean nothing (well two of them actually do), just to demonstrate 
that they don't have to be in any specific order. On my current sites 
this same system is going to an 8th level.

You might visualise this as :

1 News
       International
            UK
                 England
                       London
                             South
                 Scotland
                       Glasgow
                             South
                                   Hampden
                  Wales
            Americas
                  New York
                       New York
2 Sport

etc etc.

Notice that you can even have section names which are used more than 
once, even on the same branch.

</tip>

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.




More information about the thelist mailing list