javascript - Select tag in TD -



javascript - Select tag in TD -

i have select tag within cell in table. want add together new row if alternative selected in previous rows. want know how accomplish using dom.

this addrow javascript function

function addrow() { var newrow = document.all("esttable").insertrow(); var tblobj = document.getelementbyid("esttable"); var noofrow = document.getelementbyid("esttable").rows.length; var ocell = newrow.insertcell(); ocell.innerhtml = tblobj.rows[1].cells[0].innerhtml; ocell.childnodes[0].selectedindex =0; ocell = newrow.insertcell(); ocell.innerhtml = tblobj.rows[1].cells[1].innerhtml; ocell.childnodes[0].selectedindex =0; ocell = newrow.insertcell(); ocell.innerhtml = tblobj.rows[1].cells[2].innerhtml; }

your new code use:

var objparent = document.getelementbyid("someuniqueid");

where someuniqueid row want parent of. here can access parent anyway want to.

javascript dom

Comments

Popular posts from this blog

web services - java.lang.NoClassDefFoundError: Could not initialize class net.sf.cglib.proxy.Enhancer -

Accessing MATLAB's unicode strings from C -

javascript - mongodb won't find my schema method in nested container -