[thelist] Javascript not validating (RESOLVED)

Christopher Mahan chris_mahan at yahoo.com
Fri Sep 24 10:20:18 CDT 2004


--- David Travis <dwork at macam.ac.il> wrote:

> Hi there,
> 
> The solution has nothing to do with onclick event... you simply did
> not
> close the IMG tag... you should have used a closing tag "</img>" or
> "<img
> .... />".
> 
> The error you got was because the parser sees an opening tag (the
> image
> tag), and than a closing </a>. Since overlapping tags is not
> allowed you got
> the error.

David, you're right. I mentioned that. The only thing is that there's
no point having a javascript-only "a" tag wrapping an "img" tag when
the javascript can be put in the img tag. 

But you are right, that is what was causeing the validation error.

Also, I noted that he's probably validating HTML 4.0, not XHTML, or
he would have gotten errors on the "script" tag (no [CDATA[ section).
I guess this is what others were pointing to by having him link the
script rather that have it inline.

=====
Chris Mahan
818.943.1850 cell
chris_mahan at yahoo.com
chris.mahan at gmail.com
http://www.christophermahan.com/


		
_______________________________
Do you Yahoo!?
Declare Yourself - Register online to vote today!
http://vote.yahoo.com


More information about the thelist mailing list