473,378 Members | 1,415 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,378 software developers and data experts.

undetermined string constant error

3
This is a script I found elsewhere that I was hoping to tweak to do something just a little different. Can't figure out its error. I wouln't mind paying someone to help out if needed to get it to run as I'd like as well.

Thank you.

This is a test page on my site of the same script below:
http://www.personalizedletter.com/Letters/printtest.html




<HTML>
<TITLE></TITLE>
<HEAD>


<script language="JavaScript" type="text/javascript">
<!--
function createit(form) {
lrgewin = window.open("about:blank","","height=792,width=612 ,scrollbars=yes,toolbar=yes,resizable=yes,menubar= yes")
doc = lrgewin.document;
doc.open('text/html');
doc.write("<html>\n<head>\n<title>Christmas Letter Test<\/title>\n<\/head>\n<body
\"background=\"XMAS7.gif\" marginwidth=0 marginheight=0 topmargin=0 leftmargin=0 font face=\"Lucida Sans, Arial, Veranda, Impact\" text=\"3e66ae\">\n");
doc.write("<h3 align=center></h3>It was lunch time at the North Pole. Moe and Joe Jingle, two elves from the Nintendo division, slipped outside the toy factory and quietly raced behind the reindeer barn.<br>\n<br>\n You got it? Joe asked. Moe pulled out a sheaf of papers and smiled slyly. Yep, he said. Got it. They huddled together as Moe unfolded the papers.<br>\n<br>\n So who are we reading about today? Joe asked anxiously, trying to peer over Moe's shoulder. Santa had never installed satellite TV at the North Pole, which meant entertainment was mainly limited to watching reindeer games and playing hockey. Joe and Moe were tired of both. So the two had hacked into Santa's recently computerized Naughty and Nice list to read about the lives of the faraway people who awaited the red-suited gentleman's visit every year.<br>\n<br>\n Let's see. Today we've got some folks from <!---->" + form.hometown_0.value + ", Moe said.<br>\n<br>\n Wow! They've got <!---->" + form.noun_1.value + " there! Joe said. Joe's dream was to live in <!---->" + form.hometown_2.value + ". I bet this one's gonna be good. <br>\n<br>\nMoe's eyes skimmed the paper. Sorry. Don't think so. Doesn\'t look too exciting.\"<br>\n<br>\nJoe's face fell. Well, might as well read it anyway. We don't have anything better to do. He leaned against the reindeer barn and stuck his tongue out to catch the snowflakes that had started falling.<br>\n<br>\n Let's see, Moe said. <!---->" + form.Family_members_3.value + " are their names. Sounds like they lead a pretty normal life. <!---->" + form.Child_4.value + " has a few marks in the Naughty column, but still got an overall Nice rating. <br>\n<br>\n Darn. Nice people are always so boring, Joe said. He had moved away from the building and was now leaning this way and that with his tongue out as he maneuvered to catch the falling snow.<br>\n<br>\n Well, it's not all bad. Says here that they <!---->" + form.events__5.value + ". <br>\n<br>\n Hey, that's interesting. What else? <br>\n<br>\nMoe's eyes continued down the page. They also <!----> " + form.events__6.value + " . <br>\n<br>\n What?!? Joe yelled, forgetting all about catching snow on his tongue. I\'ve always wanted to do that! <br>\n<br>\n Calm down, calm down, Moe said, motioning with his hand. <br>\n<br>\nJoe went back to his snowflake catching. I guess these people aren't as boring as I feared. He leaned his head way back to catch a snowflake and his green elf hat fall into the snow with a soft jingle from the bell on top. What else? <br>\n<br>\n <!----> " + form.events__7.value + " .\"<br>\n<br>\nJoe took a break from trying to catch snowflakes and looked at his watch. Hey, we better get something to eat before we get back to the toy factory. Anything else before we grab some grub? <br>\n<br>\nMoe skimmed the list. Well, it also says <!----> " + form.events__8.value + " . <br>\n<br>\nJoe swiped at one more snowflake with his tongue. Think you can get another file tomorrow? <br>\n<br>\n Sure. No problem. Santa will never know. He and Joe turned and headed off to the cafeteria to get lunch. <br>\n<br>\nThey never even saw the man in the red suit who was quietly adding names to his Naughty list.<br>\n<br>\n");
doc.write("\n<\/body>\n<\/html>");
doc.close();
}
//-->
</script>

<!-- #EndEditable -->
</HEAD>
<BODY>
<!-- #BeginEditable "mainbody" -->
<table border="1" width="100%" bordercolorlight="#FFFFFF" cellpadding="5" bordercolordark="#FFFFFF" id="table3">
<tr>
<td rowspan="2" style="font-family: Arial, Helvetica, sans-serif">
<p align="center">
<font color="#FF0000">
<b>
<span lang="en-us"><font size="3">Instant Christmas Story Generator</font><br>
Elves at the North Pole<br>
&nbsp;</span></b></font></p>
<p align="left">

<body>
To create your instant Christmas letter<font size="2"><span lang="en-us">,
simply fill in the boxes below and then click the Create button. You will then
be able to copy and print the story on your own letterhead. For best results,
you can put more than one sentence in each box. See the sample below for ideas. </span>
</font>
</BODY></p>
<hr>
<p align="center">

<font color="#FF0000">
<b>
<span lang="en-us"><br>
Elves at the North Pole</span></b></font></p>
<form name="xmasstory">
<font face="Verdana, Arial, sans-serif">It was lunch time at the North Pole. Moe and Joe Jingle, two elves from the Nintendo division, slipped outside the toy factory and quietly raced behind the reindeer barn.<br><br> You got it? Joe asked. Moe pulled out a sheaf of papers and smiled slyly. Yep, he said. Got it. They huddled together as Moe unfolded the papers.<br><br> So who are we reading about today? Joe asked anxiously, trying to peer over Moe's shoulder. Santa had never installed satellite TV at the North Pole, which meant entertainment was mainly limited to watching reindeer games and playing hockey. Joe and Moe were tired of both. So the two had hacked into Santa's recently computerized Naughty and Nice list to read about the lives of the faraway people who awaited the red-suited gentleman's visit every year.<br><br> Let's see. Today we've got some folks from <input type="text" name="hometown_0">, Moe said.<br><br> Wow! They've got <input type="text" name="noun_1"> there! Joe said. Joe's dream was to live in <input type="text" name="hometown_2">. I bet this one's gonna be good. <br><br>Moe's eyes skimmed the paper. Sorry. Don't think so. Doesn't look too exciting.&quot;<br>&nbsp;</font><p>Joe's face fell. Well, might as well read it anyway. We don't have anything better to do. He leaned against the reindeer barn and stuck his tongue out to catch the snowflakes that had started falling.<br>&nbsp;<br> Let's see, Moe said. <font face="Verdana, Arial, sans-serif"><input type="text" name="Family_members_3"></font> are their names. Sounds like they lead a pretty normal life.
<font face="Verdana, Arial, sans-serif"> <input type="text" name="Child_4"></font> has a few marks in the Naughty column, but still got an overall Nice rating. <br>&nbsp;<br> Darn. Nice people are always so boring, Joe said. He had moved away from the building and was now leaning this way and that with his tongue out as he maneuvered to catch the falling snow.<br>&nbsp;<br> Well, it's not all bad. Says here that they
<font face="Verdana, Arial, sans-serif"> <input type="text" name="events__5"></font>. <br>&nbsp;<br> Hey, that's interesting. What else? <br>&nbsp;</p>
<p>Moe's eyes continued down the page. They also
<font face="Verdana, Arial, sans-serif"> <input type="text" name="events__6"></font>. <br>&nbsp;<br> What?!? Joe yelled, forgetting all about catching snow on his tongue. I've always wanted to do that! <br>&nbsp;<br> Calm down, calm down, Moe said, motioning with his hand. <br>&nbsp;<br>Joe went back to his snowflake catching. I guess these people aren't as boring as I feared. He leaned his head way back to catch a snowflake and his green elf hat fall into the snow with a soft jingle from the bell on top. What else? <br>&nbsp;<br>&nbsp; <font face="Verdana, Arial, sans-serif"><input type="text" name="events__7"></font>.&quot;<br>&nbsp;<br>&nbsp;Joe took a break from trying to catch snowflakes and looked at his watch. Hey, we better get something to eat before we get back to the toy factory. Anything else before we grab some grub? <br>&nbsp;<br>Moe skimmed the list. Well, it also says
<font face="Verdana, Arial, sans-serif"> <input type="text" name="events__8"></font>. <br>&nbsp;<br>Joe swiped at one more snowflake with his tongue. Think you can get another file tomorrow? <br>&nbsp;<br> Sure. No problem. Santa will never know. He and Joe turned and headed off to the cafeteria to get lunch. <br>&nbsp;</p>
<p>They never even saw the man in the red suit who was quietly adding names to his Naughty list.<br>&nbsp;
</p>
<p><br>
<font face="Verdana, Arial, sans-serif">
<input type="reset" value="Clear"></font>
<font face="Verdana, Arial, sans-serif">
<input type="button" onclick="createit(document.xmasstory)" value="Create"></font>
</p>
</form></p>
</BODY>
</HTML>
Oct 19 '06 #1
3 3593
r035198x
13,262 8TB
This is a script I found elsewhere that I was hoping to tweak to do something just a little different. Can't figure out its error. I wouln't mind paying someone to help out if needed to get it to run as I'd like as well.

Thank you.

This is a test page on my site of the same script below:
http://www.personalizedletter.com/Letters/printtest.html




<HTML>
<TITLE></TITLE>
<HEAD>


<script language="JavaScript" type="text/javascript">
<!--
function createit(form) {
lrgewin = window.open("about:blank","","height=792,width=612 ,scrollbars=yes,toolbar=yes,resizable=yes,menubar= yes")
doc = lrgewin.document;
doc.open('text/html');
doc.write("<html>\n<head>\n<title>Christmas Letter Test<\/title>\n<\/head>\n<body
\"background=\"XMAS7.gif\" marginwidth=0 marginheight=0 topmargin=0 leftmargin=0 font face=\"Lucida Sans, Arial, Veranda, Impact\" text=\"3e66ae\">\n");
doc.write("<h3 align=center></h3>It was lunch time at the North Pole. Moe and Joe Jingle, two elves from the Nintendo division, slipped outside the toy factory and quietly raced behind the reindeer barn.<br>\n<br>\n You got it? Joe asked. Moe pulled out a sheaf of papers and smiled slyly. Yep, he said. Got it. They huddled together as Moe unfolded the papers.<br>\n<br>\n So who are we reading about today? Joe asked anxiously, trying to peer over Moe's shoulder. Santa had never installed satellite TV at the North Pole, which meant entertainment was mainly limited to watching reindeer games and playing hockey. Joe and Moe were tired of both. So the two had hacked into Santa's recently computerized Naughty and Nice list to read about the lives of the faraway people who awaited the red-suited gentleman's visit every year.<br>\n<br>\n Let's see. Today we've got some folks from <!---->" + form.hometown_0.value + ", Moe said.<br>\n<br>\n Wow! They've got <!---->" + form.noun_1.value + " there! Joe said. Joe's dream was to live in <!---->" + form.hometown_2.value + ". I bet this one's gonna be good. <br>\n<br>\nMoe's eyes skimmed the paper. Sorry. Don't think so. Doesn\'t look too exciting.\"<br>\n<br>\nJoe's face fell. Well, might as well read it anyway. We don't have anything better to do. He leaned against the reindeer barn and stuck his tongue out to catch the snowflakes that had started falling.<br>\n<br>\n Let's see, Moe said. <!---->" + form.Family_members_3.value + " are their names. Sounds like they lead a pretty normal life. <!---->" + form.Child_4.value + " has a few marks in the Naughty column, but still got an overall Nice rating. <br>\n<br>\n Darn. Nice people are always so boring, Joe said. He had moved away from the building and was now leaning this way and that with his tongue out as he maneuvered to catch the falling snow.<br>\n<br>\n Well, it's not all bad. Says here that they <!---->" + form.events__5.value + ". <br>\n<br>\n Hey, that's interesting. What else? <br>\n<br>\nMoe's eyes continued down the page. They also <!----> " + form.events__6.value + " . <br>\n<br>\n What?!? Joe yelled, forgetting all about catching snow on his tongue. I\'ve always wanted to do that! <br>\n<br>\n Calm down, calm down, Moe said, motioning with his hand. <br>\n<br>\nJoe went back to his snowflake catching. I guess these people aren't as boring as I feared. He leaned his head way back to catch a snowflake and his green elf hat fall into the snow with a soft jingle from the bell on top. What else? <br>\n<br>\n <!----> " + form.events__7.value + " .\"<br>\n<br>\nJoe took a break from trying to catch snowflakes and looked at his watch. Hey, we better get something to eat before we get back to the toy factory. Anything else before we grab some grub? <br>\n<br>\nMoe skimmed the list. Well, it also says <!----> " + form.events__8.value + " . <br>\n<br>\nJoe swiped at one more snowflake with his tongue. Think you can get another file tomorrow? <br>\n<br>\n Sure. No problem. Santa will never know. He and Joe turned and headed off to the cafeteria to get lunch. <br>\n<br>\nThey never even saw the man in the red suit who was quietly adding names to his Naughty list.<br>\n<br>\n");
doc.write("\n<\/body>\n<\/html>");
doc.close();
}
//-->
</script>

<!-- #EndEditable -->
</HEAD>
<BODY>
<!-- #BeginEditable "mainbody" -->
<table border="1" width="100%" bordercolorlight="#FFFFFF" cellpadding="5" bordercolordark="#FFFFFF" id="table3">
<tr>
<td rowspan="2" style="font-family: Arial, Helvetica, sans-serif">
<p align="center">
<font color="#FF0000">
<b>
<span lang="en-us"><font size="3">Instant Christmas Story Generator</font><br>
Elves at the North Pole<br>
&nbsp;</span></b></font></p>
<p align="left">

<body>
To create your instant Christmas letter<font size="2"><span lang="en-us">,
simply fill in the boxes below and then click the Create button. You will then
be able to copy and print the story on your own letterhead. For best results,
you can put more than one sentence in each box. See the sample below for ideas. </span>
</font>
</BODY></p>
<hr>
<p align="center">

<font color="#FF0000">
<b>
<span lang="en-us"><br>
Elves at the North Pole</span></b></font></p>
<form name="xmasstory">
<font face="Verdana, Arial, sans-serif">It was lunch time at the North Pole. Moe and Joe Jingle, two elves from the Nintendo division, slipped outside the toy factory and quietly raced behind the reindeer barn.<br><br> You got it? Joe asked. Moe pulled out a sheaf of papers and smiled slyly. Yep, he said. Got it. They huddled together as Moe unfolded the papers.<br><br> So who are we reading about today? Joe asked anxiously, trying to peer over Moe's shoulder. Santa had never installed satellite TV at the North Pole, which meant entertainment was mainly limited to watching reindeer games and playing hockey. Joe and Moe were tired of both. So the two had hacked into Santa's recently computerized Naughty and Nice list to read about the lives of the faraway people who awaited the red-suited gentleman's visit every year.<br><br> Let's see. Today we've got some folks from <input type="text" name="hometown_0">, Moe said.<br><br> Wow! They've got <input type="text" name="noun_1"> there! Joe said. Joe's dream was to live in <input type="text" name="hometown_2">. I bet this one's gonna be good. <br><br>Moe's eyes skimmed the paper. Sorry. Don't think so. Doesn't look too exciting.&quot;<br>&nbsp;</font><p>Joe's face fell. Well, might as well read it anyway. We don't have anything better to do. He leaned against the reindeer barn and stuck his tongue out to catch the snowflakes that had started falling.<br>&nbsp;<br> Let's see, Moe said. <font face="Verdana, Arial, sans-serif"><input type="text" name="Family_members_3"></font> are their names. Sounds like they lead a pretty normal life.
<font face="Verdana, Arial, sans-serif"> <input type="text" name="Child_4"></font> has a few marks in the Naughty column, but still got an overall Nice rating. <br>&nbsp;<br> Darn. Nice people are always so boring, Joe said. He had moved away from the building and was now leaning this way and that with his tongue out as he maneuvered to catch the falling snow.<br>&nbsp;<br> Well, it's not all bad. Says here that they
<font face="Verdana, Arial, sans-serif"> <input type="text" name="events__5"></font>. <br>&nbsp;<br> Hey, that's interesting. What else? <br>&nbsp;</p>
<p>Moe's eyes continued down the page. They also
<font face="Verdana, Arial, sans-serif"> <input type="text" name="events__6"></font>. <br>&nbsp;<br> What?!? Joe yelled, forgetting all about catching snow on his tongue. I've always wanted to do that! <br>&nbsp;<br> Calm down, calm down, Moe said, motioning with his hand. <br>&nbsp;<br>Joe went back to his snowflake catching. I guess these people aren't as boring as I feared. He leaned his head way back to catch a snowflake and his green elf hat fall into the snow with a soft jingle from the bell on top. What else? <br>&nbsp;<br>&nbsp; <font face="Verdana, Arial, sans-serif"><input type="text" name="events__7"></font>.&quot;<br>&nbsp;<br>&nbsp;Joe took a break from trying to catch snowflakes and looked at his watch. Hey, we better get something to eat before we get back to the toy factory. Anything else before we grab some grub? <br>&nbsp;<br>Moe skimmed the list. Well, it also says
<font face="Verdana, Arial, sans-serif"> <input type="text" name="events__8"></font>. <br>&nbsp;<br>Joe swiped at one more snowflake with his tongue. Think you can get another file tomorrow? <br>&nbsp;<br> Sure. No problem. Santa will never know. He and Joe turned and headed off to the cafeteria to get lunch. <br>&nbsp;</p>
<p>They never even saw the man in the red suit who was quietly adding names to his Naughty list.<br>&nbsp;
</p>
<p><br>
<font face="Verdana, Arial, sans-serif">
<input type="reset" value="Clear"></font>
<font face="Verdana, Arial, sans-serif">
<input type="button" onclick="createit(document.xmasstory)" value="Create"></font>
</p>
</form></p>
</BODY>
</HTML>
For someone to pay, you may need to visit www.rentacoder.com.
I edited part of your code to

Expand|Select|Wrap|Line Numbers
  1. doc.open('text/html');
  2. doc.write("<html><head><title>Christmas Letter Test<title><head>");
  3. doc.write("<body background='XMAS7.gif' marginwidth=0 marginheight=0 topmargin=0 leftmargin=0 font face='Lucida Sans, Arial, Veranda, Impact' text='3e66ae'>");
  4. doc.write("<h3 align='center'></h3>It was lunch time at the North Pole.");
  5. doc.write("Moe and Joe Jingle, two elves from the Nintendo division, slipped outside the toy factory and quietly");
  6.  
  7. doc.write("raced behind the reindeer barn.<br /><br /> You got it? Joe asked.
The new error line number should now tell you what is causing the error.
Oct 20 '06 #2
perlet
3
For someone to pay, you may need to visit www.rentacoder.com.
I edited part of your code to

Expand|Select|Wrap|Line Numbers
  1. doc.open('text/html');
  2. doc.write("<html><head><title>Christmas Letter Test<title><head>");
  3. doc.write("<body background='XMAS7.gif' marginwidth=0 marginheight=0 topmargin=0 leftmargin=0 font face='Lucida Sans, Arial, Veranda, Impact' text='3e66ae'>");
  4. doc.write("<h3 align='center'></h3>It was lunch time at the North Pole.");
  5. doc.write("Moe and Joe Jingle, two elves from the Nintendo division, slipped outside the toy factory and quietly");
  6.  
  7. doc.write("raced behind the reindeer barn.<br /><br /> You got it? Joe asked.
The new error line number should now tell you what is causing the error.

Thank you very much :) I think I see some of what I did wrong. I put ( " ) rather than ( ' ). The string was also too long ... and I need break them down with a new doc.write("text here."); correct?

Please understand, I am not or have been to school or have been taught this. Up until now it has been cut and paste for me where Java is concerned.

Thank you again for the advice :) I'm off to work now.....
Oct 20 '06 #3
perlet
3
Thank you very much :) I think I see some of what I did wrong. I put ( " ) rather than ( ' ). The string was also too long ... and I need break them down with a new doc.write("text here."); correct?

Please understand, I am not or have been to school or have been taught this. Up until now it has been cut and paste for me where Java is concerned.

Thank you again for the advice :) I'm off to work now.....

It's fixed, Yeah!!!!! Now I can work on the text layouts and I'm all set to put this script to work on about 85 letters :D Thank you very much!
Oct 21 '06 #4

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

Similar topics

3
by: noViagraHere | last post by:
What do i need to add to the document line to stop getting an Unterminated String Constant error? itemtocheck = '1300'; document.writeln('<!--#include...
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...
3
by: shobhit.mathur | last post by:
Hi! I have a form with a textarea field. I want to validate the input from the textarea using javascript. Suppose I want to check that the user has not entered the string: "Hello World!" To...
0
by: Garth17 | last post by:
This totally surprised me. I'm using IE 6. I built a really simple test.aspx page that had a javascript block in it like this: <script language=javascript src="spanish.js"></script> Inside...
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: 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...
20
by: karthikbalaguru | last post by:
Hi, String constant being modifiable in C++ but, not modifiable in C. that is, In C++, the following example output will be "Mplusplus" char *str1 = "Cplusplus"; *str1 = 'M'; In C, the above...
1
by: VUNETdotUS | last post by:
Let's say I have a string: div.innerHTML = "<a onclick='foo(\""+myWord+"\");'></a>"; in IE only (tested version 7) if var myWord = "English" then it works fine but if var myWord = "Modifier...
1
renji1981
by: renji1981 | last post by:
Hi pals Hers my link Primus Infotech Solutions - IT Services , Product Engineering , Web Based Applications Here Im getting a Unterminated String constant Error When you click on...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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...

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.