jcorring
09-06-2008, 09:39 AM
1) Script Title: Conveyor Belt slideshow script
2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex14/index.html
3) Describe problem: Unterminated String Constant when placing this script inside a text box.
See web site: http://www.eteamz.com/ufll/news/index.cfm?subsite=1890578&cat=0#news4421878
using IE 7
Our web environment is hosted and allows script to be pasted anywhere the script could run in the body portion of a page. Specifically, I am given access to place code in text boxes. No access to the Head section of the page.
When I place this script in and load the page, I get the "Unterminated String Constant" when I load the page.
I have commented out most of the script to try to isolate a piece of code that could be the source. I've found that when I add all the code through the function definitions, I am fine. Once I add the following, I get the error:
if (iedom||document.layers){
with (document){
}
}
(I stripped out the document write statements to indentify just these lines that cause the problem.)
to simplify further, if I take out the
with (document){
}
and add just
if (iedom||document.layers){
}
I DO NOT get the error!
So I leave out the "with document" block and change all the write statements to "document.write" and I get the same error again.
Any idea what is the problem here? Since the script seems to work so well for so many, I suspect it is the environment I am trying to drop it into. But I don't know how to debug it!
2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex14/index.html
3) Describe problem: Unterminated String Constant when placing this script inside a text box.
See web site: http://www.eteamz.com/ufll/news/index.cfm?subsite=1890578&cat=0#news4421878
using IE 7
Our web environment is hosted and allows script to be pasted anywhere the script could run in the body portion of a page. Specifically, I am given access to place code in text boxes. No access to the Head section of the page.
When I place this script in and load the page, I get the "Unterminated String Constant" when I load the page.
I have commented out most of the script to try to isolate a piece of code that could be the source. I've found that when I add all the code through the function definitions, I am fine. Once I add the following, I get the error:
if (iedom||document.layers){
with (document){
}
}
(I stripped out the document write statements to indentify just these lines that cause the problem.)
to simplify further, if I take out the
with (document){
}
and add just
if (iedom||document.layers){
}
I DO NOT get the error!
So I leave out the "with document" block and change all the write statements to "document.write" and I get the same error again.
Any idea what is the problem here? Since the script seems to work so well for so many, I suspect it is the environment I am trying to drop it into. But I don't know how to debug it!