dynamic forms inside dynamic tables 
Author Message
 dynamic forms inside dynamic tables

I'm using the insertRows, insertCells methods to add rows to a table.  Then
each new row *should* contain it's own form with form elements inside each
cell.

I use innerHTML='stuff'  to insert the form tag in the first cell then
elements in subsequent cells and the closing form tag in the last cell.  (in
all calling insertCell & innterHTML 11 times per row)

The problem is that it seems IE only recognized elements in that first cell,
as though the innerHTML property automatically includes closing tags for
you.   I've checked the document.forms.length property to verify that it is
inserting the new forms.  It will see any elements in inserted in that first
cell but will not see any elements in any of the other cells.

Any ideas why it's doing this and what I can do to make the form span the
entire row?  (can't use layers)

thanks



Sun, 13 Nov 2005 05:24:23 GMT  
 dynamic forms inside dynamic tables
Some code would help to understand the problem
Quote:

> I'm using the insertRows, insertCells methods to add rows to a table.  Then
> each new row *should* contain it's own form with form elements inside each
> cell.

> I use innerHTML='stuff'  to insert the form tag in the first cell then
> elements in subsequent cells and the closing form tag in the last cell.  (in
> all calling insertCell & innterHTML 11 times per row)

> The problem is that it seems IE only recognized elements in that first cell,
> as though the innerHTML property automatically includes closing tags for
> you.   I've checked the document.forms.length property to verify that it is
> inserting the new forms.  It will see any elements in inserted in that first
> cell but will not see any elements in any of the other cells.

> Any ideas why it's doing this and what I can do to make the form span the
> entire row?  (can't use layers)

> thanks



Sun, 13 Nov 2005 17:22:32 GMT  
 dynamic forms inside dynamic tables
fm is a reference to the table that is being added to.

var newRow=fm.insertRow()
insertRoleCell(newRow, '<form name="role" method="post"><input type="hidden"
name="audID" value="' + aid + '">&nbsp;')
insertRoleCell(newRow, '<input type="text" name="role" size="21"
class="select" value="' + rn + '">')
insertRoleCell(newRow, '<input type="text" class="select" size="75"
name="descr" value="' + rt + '">')
insertRoleCell(newRow, '<input type="button" value="ADD"
onClick="saveRole(this)"></div></form>')

function insertRoleCell(ref, txt) {
 var newCell=ref.insertCell()
 newCell.innerHTML=txt;

Quote:
}

Given the above, the only element that is within the form "role" is "audID".
The other elements are lost.


Quote:
> Some code would help to understand the problem


> > I'm using the insertRows, insertCells methods to add rows to a table.
Then
> > each new row *should* contain it's own form with form elements inside
each
> > cell.

> > I use innerHTML='stuff'  to insert the form tag in the first cell then
> > elements in subsequent cells and the closing form tag in the last cell.
(in
> > all calling insertCell & innterHTML 11 times per row)

> > The problem is that it seems IE only recognized elements in that first
cell,
> > as though the innerHTML property automatically includes closing tags for
> > you.   I've checked the document.forms.length property to verify that it
is
> > inserting the new forms.  It will see any elements in inserted in that
first
> > cell but will not see any elements in any of the other cells.

> > Any ideas why it's doing this and what I can do to make the form span
the
> > entire row?  (can't use layers)

> > thanks



Sun, 13 Nov 2005 23:55:20 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Dynamic Data Structures: Dynamic Arrays?

2. Behavior and dynamic-size table

3. Building a dynamic table?

4. Dynamic Tables for Macs - again.

5. Dynamic Tables in IE5 for Mac.

6. Dynamic table problem

7. Dynamic Table

8. Creating a dynamic table

9. Dynamic Table

10. Dynamic HML Tables based on # of NOT NULL columns in RS

11. dynamic table updates

12. Newbie question--Creating Dynamic tables with VBSCRIPT

 

 
Powered by phpBB® Forum Software