[thelist] Need Help Validating

apathetic apatheticgenius at gmail.com
Tue Nov 2 08:19:33 CST 2004


On Mon, 1 Nov 2004 13:49:38 -0800, Aaron Cole <aaron at aaroncole.com> wrote:
> The validator coughs up a lung when it gets to the javascript in
> question.  Is there a better way to get this random image effect?

The Javascript is a good way to get a random image, but you might
think about including the whole div in the script, and moving it all
to an external file.

HTML:

<script type="text/javascript" src="legs.js"></script>
<noscript>
<div id="legs" class="image3"><span>leadership, entrepreneurship,
global awareness, social innovation</span></div>
</noscript>

Javascript file:

document.write( "<div id='legs' class='image" + i + "'>" );
document.write( "<span>leadership, entrepreneurship, global awareness,
social innovation</span>" );
document.write( "</div>" );

Tim

-- 
www.apatheticgenius.com
www.hyperlinkage.com - Free online RSS reader


More information about the thelist mailing list