Hi,
I am using the following javascript method inside a js file.
function createDivRow(la bel,text) {
var formedTd = '<tr><td>' + label + '</td><td> <a href="#" onclick="javasc ript:eventHandl erFunction("'+t ext+'")">'+text +'</a></td></tr>';
return formedTd;
}
But it's throwing syntax error.
I have tried the following way also.
function createDivRow(la bel,text) {
var formedTd = '<tr><td>' + label + '</td><td> <a href="#" onclick="javasc ript:eventHandl erFunction('+te xt+')">'+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 not able to call the eventHandlerFun ction() by passing the dynamic value of the 'text' .
I am using IE6. can any one help me....
I am using the following javascript method inside a js file.
function createDivRow(la bel,text) {
var formedTd = '<tr><td>' + label + '</td><td> <a href="#" onclick="javasc ript:eventHandl erFunction("'+t ext+'")">'+text +'</a></td></tr>';
return formedTd;
}
But it's throwing syntax error.
I have tried the following way also.
function createDivRow(la bel,text) {
var formedTd = '<tr><td>' + label + '</td><td> <a href="#" onclick="javasc ript:eventHandl erFunction('+te xt+')">'+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 not able to call the eventHandlerFun ction() by passing the dynamic value of the 'text' .
I am using IE6. can any one help me....
Comment