Unterminated String Constant: Need help debugging
-
Greetings Researchers: I am getting an error on my search form found on the link below and need help fixing it. http://www.respree.com/cgi-bin/SoftCart.exe/scstore/sitepages/formtest2.html?E+scstore(C&P URL if too long and it breaks) My browser IE 6.0 tells me that there is an error here - "unterminated string constant," which appears to mean that I am missing a quote (") somewhere. Not being a programmer, I don't know where to look for the missing quote. Additional information: I have stripped this page down to the most basic of elements to eliminate the possibility of the error being in other places. There are three elements remaining (on formtest2.html). 1. A javascript which kicks off my shopping cart program (SoftCart.exe) 2. The actual form itself 3. Pressing "go" activites a perl program that is my search engine querying a MYSQL database (pdbsearch.pl). For security reasons, I can't post the code to our search program on this message but will e-mail it to you, it that is where the problem lies. The specific error message in IE reads: Problems with this Web page might prevent it from being display properly or functioning properly. IN the future, you can display this mesage by double-clicking the warning icon displayed in the status bar. Line: 215 Char: 27 Error: Unterminated string constant Code: 0 URL: http://www.respree.com/cgi-gin/SoftCart.exe/cgi-bin/pdbsearch.pl?U+scstore+mkhg7352ffa7bca7+mkhg7352ffa7bca7 I would appreciate any help and comments. Thank you in advance. My e-mail address is [email protected].
-
Answer:
Hi respree-ga, The error is not in your form, but in the results page that is generated when I enter the search term 'monet' in the form and press enter. In the results page, which shows the results for the search term 'monet', you have a search box at the upper-left corner. it is in the code for this search box, that the error occurs. The code for the form appears in the file as follows : ==========HTML Code================== 213 |<INPUT SIZE="15" 214 | 215 |onClick="if(this. Products')this. 216 | 217 |onBlur="if(this. Products'" TYPE="text" NAME="keywords"> ==========End HTML====================== As you can see, line number 215 contains the JavaScript onclick event and the character 27 is the quote(') character. The problem here is that both the onclick event and the onblur event contain incomplete Javascript code. Also, you can see that the starting doublequote(") in the onclick event is NOT followed by the ending doublequote(") character. Its looks to me that these are remenants of some JavaScript that you missed removing from the code for the page. I checked out the code for the search form on the initial page at ( http://www.respree.com/cgi-bin/SoftCart.exe/scstore/sitepages/formtest2.html?E+scstore ). This page does not show any error. The HTML code for the form contains the following code : ==========HTML Code================== <input type="text" size="10" name="Keywords"> ==========End HTML====================== As you can see, the INPUT tag here does not contain the onclick and the onBlur events. So, you have two options : 1) Remove the onClick and onBlur elements from the INPUT tag on the results page. --OR-- 2) Insert valid Javascript in place of the incomplete one currently in the onClick and onBlur events. I assume that you are generating the HTML page dynamically using some sort of a template file for the HTML. In this case, you will have to modify the HTML code in this template file in order to generate the correct pages. Hope this helps. If you need any clarifications, just ask! :)
respree-ga at Google Answers Visit the source
Related Q & A:
- I need help on what I need to buy or do.Best solution by Yahoo! Answers
- I need help with some horse questions, can you help me.Best solution by Yahoo! Answers
- I need help with Adobe Photoshop.Best solution by Yahoo! Answers
- I did something really bad and now i need help please help me.Best solution by Yahoo! Answers
- What sort of opportunities are there to help people in Africa or places where people need help?Best solution by Yahoo! Answers
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.