473,387 Members | 3,033 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

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 2521
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

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

Similar topics

6
by: Jeff | last post by:
Hi, does anyone know why this: <a onclick="insertatcaret(window.opener.document.formname.fieldname,'<td class="header">')">text</a> returns a "Unterminated String Constant" error message in IE...
2
by: Tav | last post by:
this seems to be a very generic error message, and the fact that i have no way of locating what causes the error is frustrating. anyway, i'll be general with my problem. i have a div on my page...
18
by: William | last post by:
I have the following javascript function that updates a scroll_list and sends the updated entry (with its index) to a server script ( i.e. http://mkmxg00/cgi/confirmUpload.pl ) for further...
2
by: polilop | last post by:
When i open my page in IE it shows an error Unterminated string constant om Line..... When i look at the line it shows the line where the </SCRIPT> tag is ???? Moziila dose not see this error,...
5
by: ken s | last post by:
From server-side code I'm using Response.Write to display a javascript alert box. It works fine except when I try to include a new line character, which causes this javascript error: ...
5
Chrisjc
by: Chrisjc | last post by:
I Have no IDEA what this error code means on my page.. I have chech the lines listed and just doesnt add up.. here is the error Line: 11 Char: 38 Error: Unterminated string constant Code: 0...
2
by: rajuk | last post by:
Hi i have following code,when i execute this code i got unterminated string constant error.any javascript guru can you look into this please. raju /* The link details */ var links = new Array...
2
by: cubicalmonkey | last post by:
Hello, I'm attempting to get this code to work in IE. The script I have below works fine in Firefox but doesn't work in IE. Basically this script adds an onclick function to radio buttons of a...
1
by: buntyindia | last post by:
I am getting the following string from the database using Java Text <p>hi m</p> <p>Do Something</p> <p>&nbsp;</p> that I have to load into a javascript based rich text editor.
3
hemantbasva
by: hemantbasva | last post by:
i have written a the following javascript code to copy data onto clipboard but i am getting error Unterminated string constant code in cs file if (lblProcedureID != null) ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.