Page 1 of 1

dynamic inputs inside dynamic HTML table

Posted: Sun Dec 22, 2002 11:11 am
by psmshankar
Hi,

I have a situtaion like this:

1. a page "Template.php" contains a template with 2 section
a. first section contains a text box, a text area beside and a
button 'Input Table' in the next row
b. Second section also contains a text box, a text area beside
and another button 'Input Table' in the next row
2. When the 'Input Table' button is clicked in the first section, another
page "Input.html" should gets opened in a small window, to get
the 'how many rows' and 'how many columns' as inputs.
3. Based on these two inputs, a table should be shown in
the "Template.php" page right after the 'Input Table' button in the
first section with the rows as the number of rows specified in
the "Input.html" page and with the columns as specified in
the "Input.html".
And also in each column, i need a text box, so that user will enter
some data.
4. The same way for the 'Input Table' button in the second section
of "Template.php"

This can be accomplished by PHP and Javascript...
but I am struck up...

I dont know where this will fit...so I am posting it in 'PHP' and 'Client Side'
forums

Please help me out....

Thanks for your time and valuable suggestions.

Shankar

Posted: Sun Dec 22, 2002 11:28 pm
by mydimension
claiming ignorance is no excuse for cross posting. i am deleting the Client Side post.

Posted: Mon Dec 23, 2002 12:54 am
by volka
This can be accomplished by PHP and Javascript...
but I am struck up...
at which point exactly?

Posted: Mon Dec 23, 2002 2:10 am
by psmshankar
When 'Insert Table' is clicked a small window pops up to get the rows and columns...how to pass on this value to the parent window..
ofcourse using javascript we can(window.opener.document.form1.obj.val)

but in the parent window, how u can use this value and dynamically create a table after that button with input text for each column?

Posted: Mon Dec 23, 2002 2:25 am
by volka

Posted: Mon Dec 23, 2002 2:38 am
by psmshankar
cud not figure out exactly how far the innerHTML will be used here..