Kamil027
05-16-2012, 05:02 PM
Hi,
I have html variable as below:
html +=
"<div class='quickSearchResultDivUnselected' style='width:" + divWidh + "px;max-width:" + divWidh + "px'><a href='#' OnClick='javascript:test('" + title + "')>" + title + "</a></div>";
The problem is with OnClick='javascript:test('" + title + "')>".
How to make this link as <a OnClick='javascript:test("VALUE")'></a>, because now as result it looks like this and it doesn't work:
<a OnClick='javascript:test('value')'></a>;
So the problem is with ' and ". How to make it correctly in this long line of html variable ? Please help.
I have html variable as below:
html +=
"<div class='quickSearchResultDivUnselected' style='width:" + divWidh + "px;max-width:" + divWidh + "px'><a href='#' OnClick='javascript:test('" + title + "')>" + title + "</a></div>";
The problem is with OnClick='javascript:test('" + title + "')>".
How to make this link as <a OnClick='javascript:test("VALUE")'></a>, because now as result it looks like this and it doesn't work:
<a OnClick='javascript:test('value')'></a>;
So the problem is with ' and ". How to make it correctly in this long line of html variable ? Please help.