I tried it.But it still don't work. Even it can work, I think this is also not good. Becuase it make writting javascript in html template becomes so complex.
I remember in T4, I can add a same .script file with page class then write javascript in it. Can I do it like above in T5? Timo Hillerns 写道: > hi allen, > replace your '<' character with '<' in line 19 should fix it. > > regards, > timo > > Allen Guo wrote: > >> Hi All, >> >> I use javascript in my html template file like this. >> 15 <script> >> 16 function pr_single_select(id, reset_all) { >> 17 alert("OK"); >> 18 if (reset_all == true) { >> 19 for ( i = 0; i < document.forms.frmProducts.length; i++) { >> 20 if (document.forms.frmProducts.elements[i].type == 'checkbox') { >> 21 document.forms.frmProducts.elements[i].checked = false; >> 22 } >> 23 } >> 24 } >> >> >> But I always got exception below. >> Failure parsing template context:WEB-INF/shop/ProductList.html: The >> content of elements must consist of well-formed character data or markup. >> >> location >> context:WEB-INF/shop/ProductList.html, line 19, column 23 (see above) >> >> .... >> >> org.xml.sax.SAXParseException >> The content of elements must consist of well-formed character data or >> markup. >> >> Why? This is my first use javascript to my html tempplate file. what >> should i do ? >> >> Thanks >> Allen Guo >> >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> >> >> > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]