Quote:
Originally Posted by lerura
You use <script><noscript> the right way.
But there is no reason for style the spans with text-decoration.
The only content it has is a link that by default is underline.
In fact you do not need the spans at all here.
Code:
<p class="download">
<script>
document.write('<a href="javascript:void(0);" onclick="window.open('http://www.webchild.com.au/mediakit/Direct_Media_Kit_Web.pdf?nocache='+Math.floor( Math.random()*11 ) );">The Child Magazines Media Kit</a> (PDF 1 MB) ");
</script>
<noscript>
<a href="http://www.webchild.com.au/mediakit/Direct_Media_Kit_Web.pdf">The Child Magazines Media Kit</a> (PDF 1 MB)
</noscript>
</p>
will suffice
|
That's the 1996 way of doing it. You don't need to use either of the antiquated commands document.write or <noscript> to do this.
The following is all that you need to do it:
Code:
<a
href="http://www.webchild.com.au/mediakit/Direct_Media_Kit_Web.pdf"
onclick="window.open(\'http://www.webchild.com.au/mediakit/Direct_Media_Kit_Web.pdf?nocache=\'+Math.floor( Math.random()*11 ) );return false;">The Child Magazines Media Kit</a>
Note that the onclick simply needs to return false to prevent the href being followed.