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…')

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

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,"\\'")+"'";