469,330 Members | 1,341 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,330 developers. It's quick & easy.

how to solve this error unterminated string constant

Expand|Select|Wrap|Line Numbers
  1. if (flag.equals("Pub")){
  2.  
  3.                sc=(ArrayList)request.getAttribute("search");
  4.  
  5.             out.print("<table border=1 bordercolor=#008000 align=center cellspacing=0 >");
  6.             out.print("<tr><th>Pub&nbsp;Code<th>Pub&nbsp;Name<th>Short&nbsp;Desc</tr>");
  7.                     Iterator it=sc.iterator();
  8.             while(it.hasNext()){
  9.                 BookSearchBean view=(BookSearchBean) it.next();
  10.                 /*out.print("code:"+view.getCode());
  11.                 out.print("name:"+view.getName());
  12.                 out.print("desc:"+view.getDesc());*/
  13.  
  14.  
  15.                 %>
  16.         <tr onmouseover=this.style.color='red' onmouseout=this.style.color='black' onclick='show("<%=view.getSpcode()%>","<%=view.getSpname()%>")'>
  17.         <script language=javascript>
  18.         // document.Book_Find.name.value="<%=request.getParameter("name")%>";
  19.          document.write("<td>"+"<%=view.getSpcode()%>" +"</td>");
  20.          document.write("<td>"+"<%=view.getSpname()%>" +"</td>");
  21.          document.write("<td>"+"&nbsp;<%=view.getSpdesc()%>"+"</td>");
  22.          document.write("</tr>");
  23.          </script>
Sep 20 '10 #1
3 2390
gits
5,390 Expert Mod 4TB
could you say in which line the error occurs?
Sep 20 '10 #2
Expand|Select|Wrap|Line Numbers
  1. <tr onmouseover=this.style.color='red' onmouseout=this.style.color='black' onclick='show("<%=view.getSpcode()%>","<%=view.getSpname()%>")'>
Sep 20 '10 #3
gits
5,390 Expert Mod 4TB
there is a bit of mixup with quotes ... ensure that in the html all handlers will look like this:

Expand|Select|Wrap|Line Numbers
  1. <tr onmouseover="this.style.color='red'"
Sep 20 '10 #4

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

2 posts views Thread by polilop | last post: by
5 posts views Thread by ken s | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
reply views Thread by Purva khokhar | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.