Problem with javascipt + operator
Hi,
I am using the following javascript method inside a js file.
function createDivRow(label,text) {
var formedTd = '<tr><td>' + label + '</td><td> <a href="#" onclick="javascript:eventHandlerFunction("'+text+'")">'+text+'</a></td></tr>';
return formedTd;
}
But it's throwing syntax error.
I have tried the following way also.
function createDivRow(label,text) {
var formedTd = '<tr><td>' + label + '</td><td> <a href="#" onclick="javascript:eventHandlerFunction('+text+')">'+text+'</a></td></tr>';
return formedTd;
}
this version throwing ')' expected and also, the value of text which i am passing dynamically is undefined.
I am using IE6. can any one help me....

