I remember doing this a long time ago and couldn’t work out what to put in the procedure to get the damn thing to tell the browser to start a CSV download. I was mixing up my protocols and couldn’t work out how to set the MIME type. Ultimately I needed to split it up and just put this at the beginning of the procedure:

htp.p(‘mime-type text/csv’);
htp.p(’’) ; — The blank like is mandatory

Then do ya thing.

Fun with CSS styles

This is a total pain.

Define a style, say, fred

<style>
.fred { color : white ;}
</style>

How do I pick up this style’s colour somewhere else? Inherit is simply to inherit from the containing style.

This doesn’t work:

<style>
.jim { color : inherit:fred }
</style>

Think I’ll have to do something in javascript

<script>
for ( var i = 0 ; i <= document.syleSheets.length )
// find my style jim (not sure how yet)
document.writeln(‘<style>’)
document.writeln(‘.fred { color : ’ + jim.color + ’}’
document.writeln(‘</style’);
</script>

Don’t know if this will work