473,594 Members | 2,996 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 7982


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
5706
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
4662
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
7190
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
4105
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
16911
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
25195
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
5702
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
1884
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
8374
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8010
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
8242
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
5739
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
5413
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
3868
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
3903
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2389
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
1
1486
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.