|
and13345 -> RE: Using OnChange to post form back to itself (11/18/2005 0:02:09)
|
Maybe I should give more detail on what I am after. I have a form that has a lot of data on it. 3 of the pieces are OEM Name, OEM Division & OEM Contact. In my submission form, I am using a querry of the current DB records to generate these three drop downs. So if an OEM name has been listed before it appears in the list the next time I open the form. I don't have a separate DB with the records for these dropdown boxes. If I need to enter a new OEM, something I haven't used before I have a value called Enter New that unhides a text field that is used as the entry field for that dropdown. I have all that figured out, so what I want to do now is say I have OEM A, B & C in my first drop down. My second dropdown is Division. Based on the OEM I choose, I want the Division dropdown to only choose the Divisions for the OEM Name that I selected. Then the third is Oem Contact. So I know how I can filter the dropdowns when I post the page back to itself, but I am not sure how I can then at the end submit the entire form to an database insert script. Currently my form starts with this. <form METHOD="POST" action="insert.asp" onsubmit="return FrontPage_Form1_Validator(this)" name="FrontPage_Form1" language="JavaScript"> and I have several fields including the 3 dropdowns. If I use "onchange=this.form.submit()" on the dropdowns, won't it try to submit to the insert.asp page and not back to this page (called new.asp)? What I need is for the dropdowns to submit back to new.asp and when I click on the final submit button it submits to insert.asp. Does that make sense or am I confusing you more?
|
|
|
|