My hypertlink generated by JavaScript is as follows:
'<a href="#" onClick=passSearchTerm("' +aa + '");>View</a>'
The parameter passes wells when the string is as follows:
var aa = 'TAGS(\\"ab\\")';
I confirmed it by alerting inside the function
function passSearchTerm(aa) { alert(aa); }
However, this wont alert when the var is defined as follows:
var aa = 'TAGS(\"a b\")'; //space between "a" and "b"
Can anyone suggest me how to pass such string? Thanks in advance for your help. Actually I am trying to pass likely following string:
TAGS("a or b")
TAGSdo?TAGS()returns is irrelevant. The problem here is how to pass thestring"TAGS("a or b")"to a inline onclick.