Skip to content Skip to sidebar Skip to footer

Javascript Code Not Working In Jsf Xhtml Page

Here is the running code on fiddleYou will see that It is working perfectly fine here but when I run this code in eclipse using glassfish server 3.2.1 in a xhtml page then it gives

Solution 1:

Your XHTML is probably malformed.

Put your Javascript code into a CDATA section.

<scripttype="text/javascript">
    <![CDATA[
        alert("Your javascript here");
    ]]>
</script>

Post a Comment for "Javascript Code Not Working In Jsf Xhtml Page"