Command Arrays?

Results 1 to 3 of 3

Thread: Command Arrays?

  1. #1
    Join Date
    Dec 1969

    Default Command Arrays?

    This is a tough one for me.. does anyone know how to create a form where there will be lets say 1 line with 4 text boxes, Name, Email, Etc.<BR><BR>Then below it there is a drop down box with 1-10 in it, if you choose 5, it will add 5 more of the above line of text boxes.. A fellow programmer told me to use command arrays for this function, but I am not very familiar with them at all. <BR><BR>This is the sort of code he advised me to use:<BR><BR>for i = 1 to Request.Form("control1").count {<BR>Request.Form("control1"((1)<BR>}<BR>Next<BR>< BR>Quite frankly I am lost at to what command arrays really even are. Does anyone have any information on command arrays or how to write this code properly?<BR><BR>Thanks.<BR><BR>-M<BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: Command Arrays?

    Command arrays are used in Visual Basic and not ASP. A way to do what you want is to submit the form using client-side Javascript by adding an onChange event to the dropdown box. Inside the event, the form will be submitted to itself, where you can add more lines using ASP.

  3. #3
    Shoefly McButterson Guest

    Default RE: Command Arrays?

    Actually I did this very same thing a while ago.<BR><BR>What I did was create a &#060;div&#062; or &#060;span&#062; that when you clicked a button it would add more fields. Worked wonders in IE, but if you have NS4 to worry about forget it. <BR><BR>All you do is rewrite the span with an added field. Also take into account that you have to loop through all the current fields save them off to an array and reprint. This was all done server side which you would want since why would you want a round trip on a **** form.<BR><BR>Shoefly McButterson<BR>--hey thats my real name, my parents smoke lots of crack

Posting Permissions

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