table row text will not show after row insert 
Author Message
 table row text will not show after row insert

--
Hi

Once you have created a new row you only get a <tr></tr> pair
as you know to display data in a row you need a cell <td></td> so you need
to add
the cells using the insertCell method or simply using innerHTML
check out this tutorial for creating dynamic tutorials on msdn
http://www.*-*-*.com/

Thanks

Santhosh Maruthi
---------------------------------------------------------
Fortune Favours The Prepared Mind
---------------------------------------------------------

Quote:
> Hello:
> On a web page I have a button called
> cmdTest. I insert a new row on
> the click event and then add text to that
> row. The text does not show but it is there
> according to the table object.

> sub cmdTest_onclick
>    dim sss
>    dim tbls   ' collection of table elements
>    set tbls = document.body.getelementsbytagname("table")
>    set oTR= tbls("tbl649").insertrow
>    oTR.innertext="TestRow"
>    sss= tbls("tbl649").rows(1).innertext
>    alert(sss)
> end sub

> sss contains the text but it does not appear
> on the web page. What am I missing?

> IE5.0/VBScript

> Les F



Wed, 19 Nov 2003 22:08:44 GMT  
 table row text will not show after row insert
Thank you
That worked fine. I incorrectly assumed that,
since IE ignores the lack of <td></td> in
direct HTML code, I could also skip this step
when adding a table row programmitcally.

Les F


Quote:

> --
> Hi

> Once you have created a new row you only get a <tr></tr> pair
> as you know to display data in a row you need a cell <td></td> so you need
> to add
> the cells using the insertCell method or simply using innerHTML
> check out this tutorial for creating dynamic tutorials on msdn

http://msdn.microsoft.com/workshop/c-frame.htm?/workshop/author/defau...
Quote:

> Thanks

> Santhosh Maruthi
> ---------------------------------------------------------
> Fortune Favours The Prepared Mind
> ---------------------------------------------------------


> > Hello:
> > On a web page I have a button called
> > cmdTest. I insert a new row on
> > the click event and then add text to that
> > row. The text does not show but it is there
> > according to the table object.

> > sub cmdTest_onclick
> >    dim sss
> >    dim tbls   ' collection of table elements
> >    set tbls = document.body.getelementsbytagname("table")
> >    set oTR= tbls("tbl649").insertrow
> >    oTR.innertext="TestRow"
> >    sss= tbls("tbl649").rows(1).innertext
> >    alert(sss)
> > end sub

> > sss contains the text but it does not appear
> > on the web page. What am I missing?

> > IE5.0/VBScript

> > Les F



Thu, 20 Nov 2003 11:39:21 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Inserted rows in table not alined

2. show/hide an html table row

3. ADO.NET DataSet.TableName.AddTableNameRow() inserts an extra row

4. insert row from row

5. adding a table row, without setting same defaults as previous row

6. row heights of table rows added by vba

7. Err No rows at, duplicate table and row names

8. How to read Access Table row by row?

9. View mdb tables rows by rows

10. Copy row and past rows not centered

11. Insert new row at the end of the table

12. Inserting rows into tables

 

 
Powered by phpBB® Forum Software