dynamic id to dynamic elements, table with div with style

This is currently not functioning correctly and needs work

cell1h.setAttribute("id", "cell1");
cellh is the element