Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Submit form q

Status
Not open for further replies.

rick2002

Technical User
Dec 19, 2002
2
0
0
HR
I have a form in which are two dependent dropdown lists, when you choose option from the first, it reloads page and populates other list box, so the form tag is:

<FORM action=&quot;samepage.asp&quot; method=POST id=frmL name=frmL>

What I need is that the lists remain dependent and populated from access db, but also, after clicking on &quot;Search&quot; button - to search database. What do I need to add in code ? Any kind of help would be great !
 
If you post to the same page you'll need another form action to go further to the search page. So what you could do is check in your page wether a value in the first drop down list has been selected. If so, then populate your second dropdown with the desired values and make sure the action of your form points to the search page (searchpage.asp for example).

Another way of handling things is to add a javascript function to the onclick event of the submit button. In that javascript you could change the action of your form according to your needs.

good luck with it
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top