javascript error of unterminated string

Posted by OM The Eternity on Stack Overflow See other posts from Stack Overflow or by OM The Eternity
Published on 2010-05-28T12:36:59Z Indexed on 2010/05/28 12:41 UTC
Read the original article Hit count: 182

I want pass a parameter of javascript functiona which is a string. This javascript function is a hintbox on mousehover..

and the string i am using is like this:

Hemmed Finish: Every side/edge (1/2" to 2") of the banner are folded and glued (special vinyl solution) or heat pressed. This is the most common and best finish option.

Stitched Finish: Every side/edge (1" to 2") of the banner are folded in the back and stitched/sewed with white thread. This is not a common option as thread can be seen on the banner.

Now in the hintbox on mousehover the above given text has to be display as it is displayed above along with the paragraph break.. But when i pass the above as parameter in that function along with appending some backslashes to recognise some punctuation, iots till gives me javascript error of unterminated string...

I am doing this:

onMouseover="showhint('Hemmed Finish\: Every side/edge \(1/2\'\' to 2\'\'\) of the banner are folded and glued \(special vinyl solution\) or heat pressed. This is the most common and best finish option.Stitched Finish\: Every side/edge \(1\'\' to 2\'\'\) of the banner are folded in the back and stitched/sewed with white thread. This is not a common option as thread can be seen on the banner', this, event, '250px')"

pls could u help me in rectifying the issue...

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about string-manipulation