...

View Full Version : Creating TD (cell) to a TR using javascript



rao
03-17-2005, 01:45 PM
Hi,

I am trying to create a TD to a TR & setting the TD properties as follows.

myTabsRow=document.getElementById("tabsRow"); newCell=myTabsRow.insertCell(myTabsRow.cells.length);
newCell.id=tabName+"_data";
newCell.innerHTML="Test"
newCell.onclick=domouseclick('test'); // domouseclick is defined as

function domouseclick(argName)
{
alert(argName);
}

Problems is that i am not able to pass argument to the domouseclick function. It is working fine without the argument. Please help me if anybody knows how to pass argument to this function.

glenngv
03-18-2005, 06:45 AM
newCell.onclick=function(){domouseclick('test');};



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum