Genau Lopes Jr. wrote:
Gene,
I tried switch the javascript ampersands , by ASCII code , but the js didn�t works.
Anyone knows how to switch "&&" for a valid character?
Thanks,
Genau L. Jr
One solution is to move the javascript to an external file and call it with a src attribute. The other is to escape it using & which I believe *should* work. You can also add the CDATA to the content of the script:
<script type="text/javascript">
<!-- Hide script
//<![CDATA[
if(document.getElementById&&...display='block';
//]]> End script hiding -->
</script>This causes the stuff between [CDATA[ and ]] to be sent directly as raw text. From the w3.org HTML specs...
"Although the STYLE and SCRIPT elements use CDATA for their data model, for these elements, CDATA must be handled differently by user agents. Markup and entities must be treated as raw text and passed to the application as is." -- http://www.w3.org/TR/html401/types.html#h-6.2
Hope that helps, Erik ****************************************************** The discussion list for http://webstandardsgroup.org/
See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list & getting help ******************************************************
