Dynamic Form Question

Discussion in 'Javascript' started by Emmett Power, Jun 24, 2004.

  1. Emmett Power

    Emmett Power Guest

    Hi,

    I have a problem that has me stumped and I wonder if somebody has a
    suggestion or workaround for this problem.

    My objective is to let the user enter the details of organisations
    he/she has worked with and then to rank them on certain parameters. I
    don't want to restrict the user to a list of organisations.

    To achieve this I have one a number of linked web based forms:

    On form1 there are six free text boxes where the user can enter the
    names of organisations that he/she has worked with.

    On form2 the user is presented with the list of organisations that he
    has entered and asked to rank them. The form is populated using a
    script that loops through the user's selection from the database and
    creates data entry fields for each option.

    One the data validation page I capture the information from form2
    using the following script:

    <%

    arrSelectionID= split(request("SelectionID"),",")
    arrReputation= split(request("Reputation"),",")

    for i = 0 to ubound(arrSelectionID)

    vrsSelectionID = arrSelectionID(i)
    vrsReputation = arrReputation(i)

    sqlString = "UPDATE Selection SET
    Reputation='"&Trim(vrsReputation)&"'WHERE SelectionID
    ="&vrsSelectionID&""

    %>

    forms3 and so on replicate this process asking the user to rank on
    other characteristics.

    So far so good.

    Here's the problem. I would like the user to be able to use option
    buttons to select a value for each organisation but the buttons
    created by the loop script have the same name for each organisation
    which doesn't work.

    I've tried tick boxes to get around that problem but the
    split(request("Reputation"),",") is thrown if the user does not select
    one option and one option only for each organisation.

    I can use a drop down box instead of option buttons to force one value
    per selection but I don't like using a lot of drop down boxes in a
    form because I think that users quickly tire of click-dropdown-select.

    I hope that the explanation of my problem makes sense.

    I'd appreciate any suggestions for a work around or a simple solution.
    I don't mind forcing the user to enter the data with a JS validation
    script if I could construct one that was able to handle the dynamic
    elements of the form.

    Thanks in advance.

    Emmett Power
     
    Emmett Power, Jun 24, 2004
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Ruby Student
    Replies:
    4
    Views:
    148
    Ruby Student
    Apr 9, 2009
  2. pizzy
    Replies:
    4
    Views:
    144
    pizzy
    Mar 18, 2005
  3. pizzy
    Replies:
    7
    Views:
    162
    pizzy
    Mar 23, 2005
  4. pizzy
    Replies:
    0
    Views:
    168
    pizzy
    Mar 23, 2005
  5. pizzy
    Replies:
    5
    Views:
    387
    pizzy
    Apr 12, 2005
Loading...

Share This Page