Note that there are some explanatory texts on larger screens.

plurals
  1. POorg.xml.sax.SAXParseException: Unexpected character encountered (lex state 8):
    primarykey
    data
    text
    <p>Hi i have the javascript code inside XML. My code breaks if i write for loop .the function in javascipt.</p> <pre><code>{ &lt;script language="javascript"&gt; IWEventRegistry.addFormHandler("onForminit",init); var NextPath="/iwmnt/default/main/sandbox/EDITION/"; IWEventRegistry.addItemHandler("/Config/NextEditionVpathD","onItemChange",concatPath); IWEventRegistry.addItemHandler("/Config/PreviousEditionD","onItemChange",setPrev); function init() { alert("Hello"); var server = window.location.hostname; var param=new Object(); var callUrl1= "http://"+server+"/iw-cc/teamsite/genEditions.jsp?path1="+NextPath; IWDatacapture.callServer(callUrl1,param,true); alert("INIT End"); } function genIds1(item) { var str=item.toString(); alert(str); var n=str.split("-"); alert("Length is "+n.length); item1=IWDatacapture.getItem("/Config/PreviousEditionD"); alert("Item1 "+ item1); for(var i=0;i&lt;n.length-1;i++) { alert(n[i]); } } function concatPath() { var item = IWDatacapture.getItem("/Config/NextEditionVpathD").getValue(); var path=NextPath+item; IWDatacapture.getItem("/Config/NextEditionVpath").setValue(path); alert("Next Edition "+IWDatacapture.getItem("/Config/NextEditionVpath").getValue()); } function setPrev() { var item = IWDatacapture.getItem("/Config/PreviousEditionD"); var item1=item.getOptions()[item.getValue()].value; IWDatacapture.getItem("/Config/PreviousEdition").setValue(item1); alert("previous Edition " +item1); } &lt;/script&gt; } </code></pre> <p>This code working fine if i not use for loop, but after for loop, at the time of execution its giving error at mentioned in Title. Can you please tell how to fix it.</p> <p>{org.apache.xmlbeans.XmlException: error: Unexpected character encountered (lex state 8): ';'} Thanks</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload