Pandora Filter Examples
From SmartWiki
Revision as of 13:28, 29 January 2011 by Cameron (talk | contribs) (Created page with ' ==Escaping Apostrophes== When searching a text field that may contain an apostrophe (') you need to add a backslash in front of the apostrophe so it is not interpreted as closin…')
Escaping Apostrophes
When searching a text field that may contain an apostrophe (') you need to add a backslash in front of the apostrophe so it is not interpreted as closing the text string:
- The following filter can be used to search the company name field for the name in the cname field on the page.
var filter = " name='"+frm.cname.value.replace(/'/g,"\\'")+"'";