Not advanced but no luck in other forum

Results 1 to 3 of 3

Thread: Not advanced but no luck in other forum

  1. #1
    Troy Guest

    Default Not advanced but no luck in other forum

    What is the syntax in ASP if I am requesting information from multiple forms? I have two different form names, but I forgot how to call the info from a specific one. <BR><BR>ie for one form..<BR>Request.Form("TicketNumber")<BR><BR>how do i do the same thing for a form named "entry"

  2. #2
    Join Date
    Dec 1969

    Default RE: Not advanced but no luck in other forum

    You cannot have this, you can only submit ONE form. How are you doing this "2" form thing? I mean for every form, you have submition type action. Each form has a specific page to be targeted at:<BR><BR>&#060;form name="form1" method="POST" action="processMe.asp"&#062; <BR> ....<BR> &#060;input type="submit" name="submit" value="Send"&#062;<BR>&#060;/form&#062; <BR><BR>If you have 2 forms on one page, but both forms are to be used processed by the same file (but not simulatenously), you can always use the object NAME property. <BR><BR>As you know every form object has a name. If you have text objects in both, have a naming scheme such as:<BR><BR>f1Item1, f1Item2.... which is Form1-item 1...etc.<BR><BR>f2Item1, f2Item2.... which is Form2-item 2...etc.<BR><BR>Therefore, in your processing file, you simply call upon the different FORM NAMES i.e.:<BR><BR>var1 = Request.Form("f1Item1")<BR>var2 = Request.Form("f1Item2")<BR>var3 = Request.Form("f2Item1")<BR>var4 = Request.Form("f2Item2")<BR><BR>If you have to compare those values after.. use IF-THEN-ELSE clauses... <BR><BR>Hope this helped you out,<BR><BR>Vadim C.

  3. #3
    Join Date
    Dec 1969

    Default RE: Not advanced but no luck in other forum

    Create hidden form fields in form one. Create a JavaScript onSubmit function for this form that grabs the data from the second form when the user clicks submit and populates the hidden form fields of form one with the values in form two. That way you have all the values you need in your forms collection on the receiving page.<BR><BR>I&#039;ve used this technique on a page with four forms.

Posting Permissions

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