Response title
This is preview!
Syntax error while binding the dynamic table along with JavaScript function call
<p id="dashboard">
I’m trying to bind table dynamically along with JavaScript function call
<p id="dashboard">
<script>
// some code
Loop{
Table = Table + "<tr class='TRCol'><td class='TDColHead'><a onclick='openBasicDialog('"+ itemValue +"');'>" + itemValue + "</a></td>";
}
// some code
Table = Table + "</table>";
$("#dashboard").replaceWith(Table);
</script>
In browser it’s rendering with syntax error like -
IE : <a onclick="openBasicDialog(" test:123:loe:001');'="">TEST:123:LOE:001</a>
Crome : <a onclick="openBasicDialog(" test:123:loe:001');'>TEST:123:LOE:001</a>
Any solution?
© 2013 jQuery Foundation
Sponsored by and others.