Click here to Skip to main content
15,892,298 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
XML
<script type="text/javascript">
function valid()
{
    alert("hi");
    var a=document.f1.fname.value;// text box value
        if(a==null ||a=="")
            {
            alert("Please Enter your FirstName !");
            return false;
                }
    <%Scanner s = new Scanner(new File(
        "dict.Dic"));
ArrayList<String> list = new ArrayList<String>();
while (s.hasNext()) {
    list.add(s.next());
}
s.close();
for (String content:list) {%>
//var li="ji";
alert(<%=content%>);

return false;
<%}%>
return true;
}
</script>
Posted
Updated 23-Oct-12 1:43am
v4

1 solution

You don't give us much information to work with, but the error means that a string constant is missing its end quote. Meaning that it is something like:

a='this is missing a quote here ->
b="also missing a quote here ->

Good luck!
 
Share this answer
 
Comments
Member 8474700 23-Oct-12 7:56am    
I understand the meaning of the error. But i could not find what's wrong in the code tht i've posted. Because, instead of "alert(<%=content%>);" when i try "alert("hello");", the program is working fine.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900