View Full Version : combine 4 different forms

07-17-2007, 10:18 PM
i have 4 different forms, each of which just consist of a text field and a submit button. each does the same thing, searches a different site using the get method, by the search criteria submitted by the user. i would like to combine these 4 forms into one form, with one text field, one submit button, and a drop down menu to select which site to submit the search criteria to.

the problem i'm running into (besides my lack of javascript knowledge) is that to submit search criteria to these other sites the action and text field's id are different for each. how can i combine these forms into one?

i've come up with two solutions (neither of which i know how to accomplish) that would work fine for my needs. 1- a form is loaded with a default entry in the drop down and the form to search that site. when the user changes the drop down, the change triggers hiding that form and unhiding a new form with the correct text field id and action. 2- there is one static form, when the drop down is changed, the action parameter of the form and the id value of the text field are changed appropriately.

again, these are just two thoughts that popped into mind, neither of which i know how to accomplish. any help, ideas, guidance, or simple hellos would be much appreciated. thanks in advance!