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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Dynamically growing HTML Form table

Status
Not open for further replies.

sharmid

Programmer
May 17, 2001
5
IN
Need Help. We have this table with certain colums (each row/column has a text entry field), but it is not clear how many rows the page should contain. so i am thinking, i display a table with 5 rows, there should be a button at the bottom of the page for more rows, u click on the button, and another similar table "grows" at the bottom of the page. Is this possible in IE and Netscape. I had done something similar in IE, but its not working in Netscape. But even though it was working in IE, it was a lousy piece of code.

 
to make it fully cross browser and a bit more elegant, you should consider using server side code
which language does you server support ??
also, perform a search in this forum, i know the question has been asked many times here (but often the provided solution wasn't very .. elegant)
 
well Iza, the server supports Java. so, can this be done using java or javascript ?
 
yes but maybe we shold discuss this in the java forum. Briefly here are all the options i can think of :
---
3 javascript (=client side) solutions :
* hide n rows and show them when the user clicks the button
* document.write the n rows + the table (this is a pain !!)
* let an ilayer/iframe/div at the end of the table and use innerHTML (or .write) to add rows in it

---
1 java (=server side) solutions
* hitting the button sends a request to the server (same_url?more_rows=on for instance) that regenerate the page with more rows (on the top of the page detect if more_rows is here, if so and if it's on, it builds a longer table)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top