W3C home > Mailing lists > Public > www-amaya@w3.org > April to June 1999

Code to correctly insert a Table Row?

From: Ly, An <An.Ly@CAI.COM>
Date: Fri, 25 Jun 1999 12:32:28 -0400
Message-ID: <F516E350BFC4D1118F7B00805FC14BC3023E4265@usilmse2.cai.com>
To: www-amaya@w3.org
Hi,

The following code inserts a TR...but then if I start typing to add TD's,
all the TD's go in the same visual cell!

	TtaGiveFirstSelectedElement (m_Doc, &el, &firstchar, &lastchar);
	if (el != NULL)
	{
		elType = TtaGetElementType (el);

		if ( elType.ElTypeNum == HTML_EL_thead ||
			 elType.ElTypeNum == HTML_EL_tbody ||
			 elType.ElTypeNum == HTML_EL_tfoot )
		{
			// Can insert here
			elType.ElTypeNum = HTML_EL_Table_row;	
			row = TtaNewTree( m_Doc, elType, "" );
			
			TtaInsertFirstChild( &row, el, m_Doc );

		}
	}

Any ideas?!

Thanks,
An
Received on Friday, 25 June 1999 12:32:51 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Thursday, 20 September 2007 14:24:24 GMT