Although it may seem to be obvious for experienced web page authors, it was a discovery for me: XHTML does not understand special symbols “&” and “<” if written directly. So it’s impossible for example to perform “and” operation (&&) in javascript on the page.
There are two solutions for that:
1) Use CDATA for such sections of data, f.e.
-
<script type="text/javascript">
-
//<![CDATA[
-
function enableDisableRegisterButton(element1, element2) {
-
registerButtonWrapper.disabled = !(element1.checked && element2.checked);
-
...
-
}
-
]]>
-
</script>
or 2) Use escaped HTML sequences
-
& : &
-
> : <



