127
rated 0 times
[
133]
[
6]
/ answers: 1 / hits: 17427
/ 12 Years ago, wed, january 9, 2013, 12:00:00
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)
More From » html