Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Escape Characters?

Quote Reply
Escape Characters?
Hello,

I am using SQL within JavaScript to access an Amazon like site. I can display all of my titles, etc. I can select the titles and add them to my cart, etc. HOWEVER, if I have a ' within my title...it breaks!

Should I use an escape character to eliminate this problem? I have been trying it out; but, haven't had much success so far.

Would appreciate your thoughts...

twilson
Quote Reply
Re: [twilson] Escape Characters? In reply to
Not sure where the breaking is occurring but if it is within the javascript can't you use something like this:

title = escape(document.title);
Quote Reply
Re: [afinlr] Escape Characters? In reply to
Thanks. I will look into that.

After working with the SQL for a while, I started to realize that maybe my issue is with the arguments being sent to the javascript function (on a parent page).

Essentially, the first select is fine either way (with or without a '). After I select the title (or item), the recordset items are set as the arguments that are sent to the javascript function. Perhaps, it sees it as the end of a string in my argument listing. Hmm.

Starting to check it out now...

twilson