PDA

View Full Version : insert href into table cell using javascript



visweswaran28
05-12-2010, 12:23 PM
Hi,

I want to insert href into tabel cell using javascript. Note should support all browser.

I know to insert, but it support only in IE, I checked in firefox, it does not support so please help me.

This is code to insert(works in IE)

var myLink = document.createElement('a');
var href = document.createAttribute('href');
myLink.setAttribute('href','javascript:removeRow(' +pos+')');
myLink.innerText ="Delete";
newCell.appendChild(myLink);