fnAddData and single quotes
fnAddData and single quotes
Strangely, this only occurs in Firefox but not IE.
When I use fnAddData to add a row with info from a form, it fails if the value has a single quote in it.
.replace(/\'/g, "'") does not help
.replace(/\'/g,'\\\'') does not help and just results in the backslash displaying in the new row in IE.
When I use fnAddData to add a row with info from a form, it fails if the value has a single quote in it.
.replace(/\'/g, "'") does not help
.replace(/\'/g,'\\\'') does not help and just results in the backslash displaying in the new row in IE.
This discussion has been closed.
Replies
jsonSelect = JSON.parse( selectstmt );