Hi,
I need to add acnhor tag dynamically using javascript. I have achived this using following code, but there is little prioblem.
function addURL(token){
var tableObject = document.getElementById("tableConfirmationsToAttach");
var rowCount = tableObject.rows.length;
var row = tableObject.insertRow(rowCount);
var cell2 = row.insertCell(0);
cell1 = document.createElement("<td class='footnote'>");
//cell1.innerHTML = "<a href='"javascript:launchANewWindow(" + "'" + token + "' " + ", " + "'" + "document" + "')" + "' >"+ token +"</a>";
cell1.innerHTML = "<a href='"+ token +"' >"+ token +"</a>";
cell2.appendChild(cell1);
}
if I use a codeline like
cell1.innerHTML = "<a href='"+ token +"' >"+ token +"</a>";
Evrything works fine, but I need to set a fucntion call (having 2 paramters)
in href, something like below
cell1.innerHTML = "<a href='"javascript:launchANewWindow(" + "'" + token + "' " + ", " + "'" + "document" + "')" + "' >"+ token +"</a>";
but this doesn’t work
Can anybody here, help me with this ?
thanks in Advance.