I have an asp page with Javascrippt. The page uses a thrid party component that does a mouse oever effect which pulls data from my database table. I am having the problem that special characters are creating an unterminated string error.
I have gotte around the most common one by using the script below to delete out the apostrophes. I have a new client that needs to see those apostrophes and also any other special character.
function apostoquote()
{
var replacewith="";
var oldstring=FrontPage_Form1.QuestionHelp.value;
var newstring=oldstring.replace(/'/g,replacewith);
{
FrontPage_Form1.QuestionHelp.value=newstring
}
}
So I need a script that will
Check the entire FrontPage_Form1.QuestionHelp.value string, find all special characters (!,@,#,$,%,^,&,*,(,),_,+,|,{,},[,], carriage return, tab,',",:,;,?,<,>,.,/) and replace them with code that will work in HTML.
THANKS
or try urlencode functions on server