473,811 Members | 3,402 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Unterminated String Literal

I don't understand why I'm getting Unterminated String Literal error
MY JAVASCRIPT
function test(){
newWindow =
window.open("", "","scrollbars, resizable,heigh t=300,width=200 ,top=5,left=50" ,align='center' );
newWindow.docum ent.write( "<html><head><t itle>The
Title</title></head>")
newWindow.docum ent.write( '<body bgcolor="#ffffc c"
onBlur="window. close()"')
newWindow.docum ent.write("<BR> This is a test<BR>")
newWindow.docum ent.write('<h3> <center><a href="#"
onClick="window .close()">Close Window</a>
</h3></center></body></html>');
}
BELOW IS WHAT I GET FROM THE JAVASCRIPT MONITOR
function test(){
newWindow =
window.open("", "","scrollbars, resizable,heigh t=300,width=200 ,top=5,left=50" ,align='center' );
newWindow.docum ent.write( "<html><head><t itle>The
Title</title></head>")
newWindow.docum ent.write( '<body bgcolor="#ffffc c"
onBlur="window. close()"')
newWindow.docum ent.write("<BR>
<!-- following code added by server. PLEASE REMOVE -->
<!-- preceding code added by server. PLEASE REMOVE -->This is a
test<BR>")
newWindow.docum ent.write('<h3> <center><a href="#"
onClick="window .close()">Close Window</a>
</h3></center></body></html>');
}

LINK TO THE PAGE
http://ca.geocities.com/la********@rogers.com/test.html

Any help would be greatly appreciated.

Apr 1 '06 #1
1 7996


la********@roge rs.com wrote:
I don't understand why I'm getting Unterminated String Literal error BELOW IS WHAT I GET FROM THE JAVASCRIPT MONITOR newWindow.docum ent.write("<BR> ^^^^^^
There is your unterminated string literal, complain to your web hosting
service that they insist on inserting the lines below in the middle of
your JavaScript code.
<!-- following code added by server. PLEASE REMOVE -->
<!-- preceding code added by server. PLEASE REMOVE -->This is a
test<BR>")

--

Martin Honnen
http://JavaScript.FAQTs.com/
Apr 1 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
5721
by: KathyB | last post by:
Hi, this is the first lines of a function. Although it runs, it still throws an "Unterminated string constant" error in the browser. It is all in one line, just wouldn't fit here. The error appears to occur right after type='+typeIn+'&id <----before the = Any clues appreciated! Thanks, Kathy
1
4678
by: vanitha | last post by:
Hi All, I am using "C" to generate the javascript code. And i am getting the following error message "Unterminated string literal" in the mozilla webbrowser for the following syntax. unsigned char *Buf="Test" printf("alert(\"%s\");\n\n",Buf);
2
7217
by: Daniel Secomb | last post by:
Hi, I'm using PostgreSQL 7.3.4 on phpPgAdmin 2.4.2 and I'm getting the following error when I try and run a SQL query on a script: Error - /usr/local/psa/admin/htdocs/domains/databases/phpPgAdmin/db_readdump.php -- Line: 33 PostgreSQL said: ERROR: parser: unterminated quoted string at or near "'Black Tea\015\012Fresh range of leaf tea for drinking black or with
3
4115
by: aroraamit81 | last post by:
Hi, I am facing a problem in javascript. strdata is a variable of javascript and following is an assignment( hmmmmmmmmmmm a Huge one but unfortunately its not mine code, I am just trying to rectify it) to this varibale.. Now I am facing a run time error(Unterminated string constant). Can any one please help me solving this bug. strdata +="<tr <% if functionality_add = 0 and functionality_edit = 0
2
16920
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, allso avant browser (shell for IE) dosent see it. the script works fine, i'm just anoyed with IE calling errors. Anybody know why this is?
7
25208
by: vunet.us | last post by:
I have a function to open new window: function bla(){ newwin = window.open("page.asp?file=1&id=<%=ID %>","Image","other params") } This function works fine mostly, but sometimes, there is a JavaScript error: "Unterminated string literal". This happens only in one case. If you noticed ASP variable <%=ID%>, then here's what happens to it. ID gets url parameter "id" and inserts in that JavaScript. Obviously, this URL comes from another...
7
5721
basstradamus
by: basstradamus | last post by:
Hi When I am trying to eveluate object literal It causing Unterminated string constans error (firefox). var obiekt = (eval("("+data+")")); the data is carring object literal recived from server (AJAX - JSON format) It works normaly for smaller strings, but when data variable has about 20 000 chars there is an error. Is there any limitations to string lenght that will be evaluated by eval()?
0
1898
by: manojpolawar2008 | last post by:
Hi, I am using the fckeditor with asp.net2.0. I have declared and initialized and the FCKEditor on code behind(ie on aspx.vb) page. and i wan to set the ViewState value to FckEditor on .aspx page in Javascript function. for that i have used SetHTML() or value. but it showing error. ERROR- unterminated string literal. in firefox and IE also.
0
9726
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9605
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
10395
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10130
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7667
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6887
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5692
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4338
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3865
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.