I have a very easy javascript code inside an xhtml page, but Glassfish doesn't want to render it due an internal error:
javax.servlet.ServletException: Error Parsing /basicuser/singletripcreation.xhtml: Error Traced[line: 14] Il riferimento di entità "callback" deve terminare con il delimitatore ';'.
the code involved at the line 14 is the following
<script language="Javascript">
function loadGoogleMapsScript()
{
var script = document.createElement("script");
script.type = "text/javascript";
script.src = "http://maps.google.com/maps/api/js?sensor=false&callback=visualizzamappa";
document.body.appendChild(script);
}
loadGoogleMapsScript();
</script>
the 14th line is "script.src = ...."
what is wrong?! the error looks like inside the string. I this is a compilation error, why the compiler check inside a string?!? (yes the error is shown even before the execution, like compilation error)
How could i solve?!
thankyou very much
---- @Mike
Now the error is on :
for (var x=0; x<indirizzi.length ; x++)
codifica_indirizzi(indirizzi[x], descrizioni[x]);
and say:
javax.servlet.ServletException: Error Parsing /basicuser/singletripcreation.xhtml: Error Traced[line: 47] Il tipo di elemento "indirizzi.length" deve essere seguito dalle specifiche di attributo ">" o "/>".
causa principale
"the kind of element 'indirizzi.length' must be followed by the specificaton ot attribute '>' or '/<'"