document.frm1.submit(); submitting form directly

Hi! I have a php form and I am using it to update,delete and insert data.I use a drop down to display customer names and when the customer is selected, the form should be submitted with document.frm1.submit(); so that I can get company id of that customer.

Problem is, when I try to update the data and select customer,suddenly the insert query is executing.I tried to put conditions, sending hidden values but nothing seems working.Either the form refuses to submit, or submits accidentally due to document.frm1.submit();

asafg: While this subject[url=http://www.sleekfunmaza.com]FREE MOVIES ONLINE[/url] can be very touchy[url=http://www.sleekmarriage.com/]no. 1 matrimonial site in the world[/url] for most people, my opinion is that[url=http://www.sleeksight.com/]jobs in pakist

the form should only be submitting when you change the option on the select box, are you supposed to be able to enter data after selecting it? if you are this method won't work, you should just use the submit button

actually when i hit the update link and select customer name from dropdown, suddenly the form submits and "data updated " message displayes.i am not sure keeping code separate will solve the issue.but let me check it once.