F
Francois
Salut - Hello,
I'm trying to comply with W3C HTML 4.01 Strict standards BUT one JS code is
causing me troubles. The parser returns an error of "having a closure tag
</a> with no other tag open before".
This is weird because the Js is OK but now I need to change it to comply
with W3C standards AND accomplish the same simple thing. Can you help?
Merci!
--------- here's the code ----------
<script type="text/javascript">
gfx0="http://www.etc";
lnk0="http://www.etc";
alt0="some text";
txt0="some text";
gfx1="http://www.etc";
lnk1="http://www.etc";
alt1="some text";
txt1="some text";
gfx2="http://www.etc";
lnk2="http://www.etc";
alt2="some text";
txt2="some text";
gfx3="http://www.etc";
lnk3="http://www.etc";
alt3="some text";
txt3="some text";
len=4;
today=new Date();
today=today.getTime()/1;
rnd=today%len;
document.writeln('<a href="'+eval("lnk"+rnd)+'"><IMG
SRC="'+eval("gfx"+rnd)+'"alt="'+eval("alt"+rnd)+'"><br>'+eval("txt"+rnd)+'</
a>'); //HERE'S THE PROBLEM!
</script>
I'm trying to comply with W3C HTML 4.01 Strict standards BUT one JS code is
causing me troubles. The parser returns an error of "having a closure tag
</a> with no other tag open before".
This is weird because the Js is OK but now I need to change it to comply
with W3C standards AND accomplish the same simple thing. Can you help?
Merci!
--------- here's the code ----------
<script type="text/javascript">
gfx0="http://www.etc";
lnk0="http://www.etc";
alt0="some text";
txt0="some text";
gfx1="http://www.etc";
lnk1="http://www.etc";
alt1="some text";
txt1="some text";
gfx2="http://www.etc";
lnk2="http://www.etc";
alt2="some text";
txt2="some text";
gfx3="http://www.etc";
lnk3="http://www.etc";
alt3="some text";
txt3="some text";
len=4;
today=new Date();
today=today.getTime()/1;
rnd=today%len;
document.writeln('<a href="'+eval("lnk"+rnd)+'"><IMG
SRC="'+eval("gfx"+rnd)+'"alt="'+eval("alt"+rnd)+'"><br>'+eval("txt"+rnd)+'</
a>'); //HERE'S THE PROBLEM!
</script>