Forum Moderators: open

Message Too Old, No Replies

unterminated string constant

cant find it

         

stef25

2:57 pm on May 20, 2004 (gmt 0)

10+ Year Member



IE reports that error message in the first paragraph/line but i cant seem to find it. anyone?

document.write('<div style="position:relative;width:'+slideshow_width+';height:'+slideshow_height+';overflow:hidden"><div id="canvas0" style="position:

absolute;width:'+slideshow_width+';height:'+slideshow_height+';top:0;left:0;filter:alpha(opacity=10);-moz-opacity:10"></div><div id="canvas1" style="

position:absolute;width:'+slideshow_width+';height:'+slideshow_height+';top:0;left:0;filter:alpha(opacity=10);-moz-opacity:10"></div></div>')
else
document.write('<img name="defaultslide" src="'+fadeimages[0]+'">')

Alternative Future

3:04 pm on May 20, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi stef25,

Have you tried it like this?

document.write("<div style='position:relative;width:+slideshow_width+;height:+slideshow_height+;overflow:hidden'><div id='canvas0' style='position:
absolute;width:+slideshow_width+;height:+slideshow_height+;top:0;left:0;filter:alpha(opacity=10);-moz-opacity:10'></div><div id='canvas1' style='
position:absolute;width:+slideshow_width+;height:+slideshow_height+;top:0;left:0;filter:alpha(opacity=10);-moz-opacity:10'></div></div>")

-George

Rambo Tribble

3:16 pm on May 20, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Nothing jumps out, but try stripping various bits out until IE doesn't choke anymore, then you will have found the culprit.

stef25

3:25 pm on May 20, 2004 (gmt 0)

10+ Year Member



george i pasted your code in there but i get the same error msg. if im not mistaken you replaced the ' with " right?

its for an image slidehow ...

Alternative Future

3:27 pm on May 20, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Yeah I basically stripped out the starting ' and replaced it with the double quote, then all subsequent quotes around the size parameters as you can sometimes get off without them being quoted. I tested it from my end and IE seemed fine with it.

Will have another look...

-George

stef25

3:31 pm on May 20, 2004 (gmt 0)

10+ Year Member



its this script from the dynamic drive. i just replaced the path of the foto's with my own and adjusted the sizes:

[dynamicdrive.com...]

Alternative Future

3:31 pm on May 20, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Did you try the document write on one continuous line? Strip the line breaks back to one line that’s the only difference I have this end I think!

-George

Alternative Future

3:41 pm on May 20, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I tried out the original from the site suggested and both yours and theirs match I then removed all line breaks from your post and it removed the error!

-George

Bernard Marx

3:57 pm on May 20, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



--- not needed now ---

stef25

8:07 pm on May 20, 2004 (gmt 0)

10+ Year Member



another example of how useful this forum is ...

removing the linebreaks solved my problem

thx
stef