> -----Original Message----- > From: Jason Ostrom [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, June 04, 2002 10:06 PM > To: [EMAIL PROTECTED] > Subject: Dynamically creating submit buttons > > > To those in the know, I have a couple of questions about the best way > to create dynamic form elements. > > I have a script that queries a database and dynamically generates a > table, as shown below in the code. What I am attempting to do is have > a form element off to the right of each Table Row that the user can > select. The problem is I don't know for sure what the variables will > be retrieved from the database, but need to have it off to the right, > and created on the fly. > > The user will then select the "Submit" or "Radio button" for the > element, and this will create a query to the database, > returning several > elements. Within these elements created, I then need to have another > way of selecting another "Submit" button within each of the values > that are returned the first time. > > My questions are: > 1. What is the best type of form element that will send the request > to the database? For example, submit, radio, etc.??
This is a "drill down" concept, right? Why not just use a simple link? <A HREF=...>Details</A> If you want a form, I would use a Submit button. If you use a radio button, you either need a Submit button somewhere else, or you need to use onclick to submit the form, which seems counter-intuitive to me. You'll have to name the submit button in such a way as to identify the row selected. > > 2. How can I have perl create a form element off to the right of > each table row that is separate from the table? Don't close the table row. Just put the form element inside a <TD></TD> > > 3. Am I using the HTML to create the table correctly given what I am > trying to do? > > > Any help would be very appreciated. I'm basically just confused on > how to implement this with CGI.pm. I don't see any evidence of CGI.pm being used in your code. You're just handrolling your HTML, which is fine with me, but not necessarily the "CGI.pm" way... [snip code for brevity] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]