Webskater
09-09-2003, 10:51 AM
I am writing a recordset to the screen. Each row has a cell with a long description which I pass to a (vb) function to truncate. I also pass the string to a javascript function to display the (untruncated) string in a pop up window on mouseover.
If the string has an inverted comma in it - the javascript function fails.
I can loop through all the strings in vb and do a replace before it gets to the javascript function, but is there a better way? i.e. is there a javascript method that will go through the string and deal with offending characters - like escape does if you want to deal with offending characters before sending in a querystring. Thanks for any help.
If the string has an inverted comma in it - the javascript function fails.
I can loop through all the strings in vb and do a replace before it gets to the javascript function, but is there a better way? i.e. is there a javascript method that will go through the string and deal with offending characters - like escape does if you want to deal with offending characters before sending in a querystring. Thanks for any help.