More than one form on a search page

Results 1 to 2 of 2

Thread: More than one form on a search page

  1. #1
    Join Date
    Dec 1969

    Default More than one form on a search page

    Hi, I am trying to run a search page that lets you search through a textfield called keywords (in one form) or by two dynamically populated dropdown menus (in the second form).So there are two forms on the page using the GET method.<BR><BR>On my results page I am trying to say;<BR><BR>if (Request.QueryString("Type") &#060;&#062; "") then &#039;this is the dropdown form<BR> Products.Source = "SQL QUERY NO 1" <BR>else<BR> if (Request.QueryString("keywords") &#060;&#062; "") then &#039;this is the keywords form<BR> Products.Source = "SQL QUERY NO 2"<BR>end if<BR>end if<BR><BR>Does this sound like the right way to go? I cant get any results coming from the keywords form, only the dropdown is working. In fact I dont even get an error at all from keywords- just a blank results page.

  2. #2
    Join Date
    Dec 1969

    Default Only one form will submit...

    You can have as many forms as you want on a page, but only *ONE* form can be submitted to any given server-side process. (This is not a limitation of ASP...any other kind of server would have the same limitation: JSP, CGI, PHP, CF, etc.)<BR><BR>Having said all that...What you are doing will work fine so long as you have one SUBMIT button for each form. Whichever submit is pushed will submit only the form it is part of.<BR><BR>

Posting Permissions

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