I have a form element in an XSL file. I want to have a javascript function in the same XSL file to enable the Submit button on checking a check box. Here is the form - \[code\]<form action="NewUserNavigation" method="post" name="NewUserNavigationForm"><input name="eventName" type="hidden" value="http://stackoverflow.com/questions/11239685/NewUserNavigationEvent"/><div class="sansIcon"> <input type="checkbox" name="chk" onClick="EnableSubmit()"><xsl:apply-templates select="content[@name='chkbox']" mode="impl_expandContent"/></input> </div><div class="buttonBarPage"><input name="Submit" class="primary" type="submit" value="http://stackoverflow.com/questions/11239685/Continue" disabled="true"/></div></form>\[/code\]Here is the XML conetent that it is reading - \[code\]<content name = "chkbox"> Yes, I understand and agree to the T&C.</content>\[/code\]I am facing problem with the javascript, it gives error. I have put an alert to check if the function is being called on click of the checkbox. here is the code I am using - \[code\]<script type="text/javascript">function EnableSubmit(){ alert("test"); if(document.NewUserNavigationForm.chk.checked==true) { document.NewUserNavigationForm.Submit.disabled=false; } if(document.NewUserNavigationForm.chk.checked==false) { document.NewUserNavigationForm.Submit.enabled=false; }}</script>\[/code\]I get this error....\[code\]org.xml.sax.SAXParseException: illegal top-level element\[/code\]