Dynamic Form Design

Results 1 to 2 of 2

Thread: Dynamic Form Design

  1. #1
    Join Date
    Dec 1969

    Default Dynamic Form Design

    I am working on a page that is a database connected financial app. (Forgive the simple terms). Basically, I am trying to keep the database at least a little normalized by having a one to many table relationship between person and debt in which a single person might have many debts.<BR><BR>Notes: <BR>1. DB - Right now, to solve this, I simply put in the customer table Customer Name, Debt1, Debt2, Debt3, Debt4,... etc... This keeps all of the data in one table, and prevents a one to many relationship where the information should be in two tables, borrower, which has BorrowerID and BorrowerName. And then a second table that has BorrowerID and Debt.<BR><BR>2. Right now, the asp page has 24 inputs, each of which has a respective value of &#060;% =analysisRS(debt1) %&#062; all the way through all of the debts. It works, but it is a real pain in the *** because half of the time, I have a giant form for someone with two debts.<BR><BR>3. What I want to do is build the form dynamically like such:<BR><BR>strMax = db("select count(debt) from debts where BorrowerID = " &borrowerID)<BR><BR>for (i=1 ; i &#060;= strMax ; i++)<BR>{<BR>document.write("&#060;td&#062;&#060;i nput name = ????? value = ?????"&#062;/td&#062;)<BR>}<BR><BR>Again, forgive the simplicity, but I am a jackass and I am still working my way through learning all of the different tools that are available. Of course I can get it to build 5 dynamic boxes, that is not rocket science, but I can&#039;t seem to throw in a dynamic name or value. I built the dynamic names as:<BR><BR>strTemp = "debt"<BR>strTemp = strTemp & i<BR><BR>And then tried putting in the name = strTemp. But of course then the name just came out as strTemp.<BR><BR>And then I am having an issue putting the recordset access from there. Normally for value I would just put &#060;% = analysisRS("debt1")%&#062; all the way through, but now I need to build it dynamically so it should be something like &#060;% = analysisRS(eval(strTemp))%&#062; But I seriously doubt that is going to work. Go fig.<BR><BR>Anyone who has any idea what I am talking about, please help me :)<BR><BR>Also, if I am just going about this all right, feel free to smack the crap out of me prior to pointing me in the right direction. My background is Database programming unfortunately, not building web interfaces.

  2. #2
    Join Date
    Dec 1969

    Default RE: Dynamic Form Design

    What I would do, if I were you, is that first, normalize the schema.<BR>then, go to the FAQs I would start with:<BR>http://www.aspfaqs.com/aspfaqs/ShowCategory.asp?CatID=9

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts