Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

need help align checkbox

Status
Not open for further replies.

cat5ive

MIS
Dec 3, 2004
184
US
Hi,

I have a function to add extra rows to my table, when user click 'Add' buton. One of the input fields in my row is a checkbox. I have problem trying to align the checkbox (horizontally). The checkbox in original rows are aligning ok. Only the one that got added later are left adjusted.
Below is my code. Please help.

Code:
var cell34 = row.insertCell(34);
     var c9 = document.createElement('input');
     c9.type = 'checkbox';
     c9.name = 'XDEL' + iteration;
	 c9.align = "center";
	 cell34.appendChild(c9);

//original cell
<td class="ver10pxblk" align="center"><input type="checkbox" name="XDEL<%=i%>" id="c9_<%=i%>" ></td>
 
Nevermind, got it now.

var cell34 = row.insertCell(34);
cell34.setAttribute("align","center")
var c9 = document.createElement('input');
c9.type = 'checkbox';
c9.name = 'XDEL' + iteration;
//c9.align = "center";
cell34.appendChild(c9);
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top