[Greasemonkey] Inserting Row in Table

A. Alfred Ayache alfred at lastbyte.ca
Sun May 28 13:22:05 EDT 2006


 >>>
	var newrow = document.createElement('tr');
	newrow.setAttribute("class", 'bgtbllgreen');
	var shtml =
		'<td class="tabletitle3">&nbsp;</td>' +
		'<td class="tabletitle3" align="left" colspan="3">Total IN + OG</td>' +
		'<td></td>' +
		'<td></td>' +
		'<td></td>' +
		'<td></td>' +
		'<td></td>' +
		'<td></td>' +
		'<td></td>' +
		'<td></td>' +
		'<td></td>' +
		'<td class="tabletitle3" align="right" nowrap>$0.00</td>' +
		'<td class="tabletitle3"><span class="smalltext2">&nbsp;</span></td>' +
		'<td></td>' +
		'<td class="tabletitle3" align="right" nowrap>$0.00</td>' +
		'<td class="tabletitle3"><span class="smalltext2">&nbsp;</span></td>' +
		'<td></td>' +
		'<td class="tabletitle3" align="right" nowrap>$0.00</td>' +
		'<td></td>' +
		'<td class="tabletitle3" align="right" nowrap>$0.00</td>'
	;
	newrow.innerHTML = shtml;
	var lastrow = rows[rows.length - 1];
	lastrow.parentNode.insertBefore(newrow, lastrow);
<<<

A. Alfred Ayache
http://lphs76.ca             - Reunion community
http://www.rentersPlus.com   - Apartment Search
http://www.lastbyte.ca       - Web Design, eCommerce, PHP/MySQL, Java, Oracle


Jeremy Dunck wrote:
> On 5/28/06, A. Alfred Ayache <alfred at lastbyte.ca> wrote:
>> I need to insert a row with 22 cells.  I thought I'd make life a 
>> little easier
>> for myself, and just created a tr element, and stuck the rest of the 
>> row in
>> innerHTML.  For some reason, none of those TD's show up, but the spans 
>> do.
> 
> They ought to.  Show us the code.  :)
> _______________________________________________
> Greasemonkey mailing list
> Greasemonkey at mozdev.org
> http://mozdev.org/mailman/listinfo/greasemonkey
> 
> --------------------------------
> Spam/Virus scanning by CanIt Pro
> 
> For more information see
> http://www.kgbinternet.com/SpamFilter.htm
> 
> To control your spam filter, log in at
> http://filter.kgbinternet.com
> 
> 


More information about the Greasemonkey mailing list