[thelist] (x)html 1.0 validation with javascript

Christopher Mahan chris_mahan at yahoo.com
Wed Jun 23 09:56:18 CDT 2004


--- Matt Tibbits <metibbits at yahoo.ca> wrote:
> 
> Actually the problem was not with OnClick...after a good nights

> Anyways, since everything is now lowercase it validates using
> strict XHTML
> 1.0 and my script also works.

A reminder:

when putting a javascript in a xhtml 1.x doc, in the body, use the
cdata tag and escape it, like this:

<script type="text/javascript">
  // <[CDATA[
  function foo(){
  }
  // ]]>
</script>

Also note that you need the space after // and before <[CDATA[
as well as after // and before ]]>

Works in ie, moz, etc

  
  

=====
Christopher Mahan
chris_mahan at yahoo.com
818.943.1850 cell
http://www.christophermahan.com/


	
		
__________________________________
Do you Yahoo!?
New and Improved Yahoo! Mail - 100MB free storage!
http://promotions.yahoo.com/new_mail 


More information about the thelist mailing list