[thelist] string help
.jeff
jeff at members.evolt.org
Thu Oct 31 15:25:00 CST 2002
tom,
><><><><><><><><><><><><><><><><><><><><><><><><><><><><><
> From: Tom Dell'Aringa
>
> cell.innerHTML = '<a href="javascript: deleteDoc()">blah</a>'
><><><><><><><><><><><><><><><><><><><><><><><><><><><><><
you might try something else instead.
deleteLink = document.createElement('A');
deleteLink.href = 'JavaScript://';
deleteLink.htmlFor = 'cb_' + id;
deleteLink.onclick = function()
{
// create an object reference to the checked box that
// this "x" button is associated with
cb = this.htmlFor;
// your deleteDoc() function body goes in here;
return false;
}
cell.appendChild(deleteLink);
this is off the top of my head and untested.
><><><><><><><><><><><><><><><><><><><><><><><><><><><><><
> If I just pass cb_3 of course it thinks its a variable,
> not the iD...
><><><><><><><><><><><><><><><><><><><><><><><><><><><><><
ah, the joys of creating function calls within dynamically generated strings
of html.
.jeff
http://evolt.org/
jeff at members.evolt.org
http://members.evolt.org/jeff/
More information about the thelist
mailing list