Hi, everybody,
(I'll preface this by saying I did search around, at length, and couldn't really find any posts that exactly describe this situation. It's not particularly easy to search for, either, because the terms are so common.)
Here's a fun one. I have an HTML form, nothing fancy, with a drop-down ( <select> ) menu, a few fields, and a Submit button. When the user makes a selection from the menu, I need to reload the page to trigger some dynamic changes in the HTML that create the fields below, which are based on the user's menu selection. To reload the page, I have simply attached an onchange="document.form.submit()" behavior to the <select> element of the menu.
The problem I'm having is that the entire form contents are being submitted (obviously) when the user changes the menu. That's fine, but I need a clever way to determine whether the form was submitted because the user changed the menu, or because the user intentionally pressed the Submit button.
I'd really prefer to avoid the use of JavaScript in finding a solution (translation: I'm aware of http://www.xml.com/lpt/a/2005/02/09...p-request.html and http://www.google.com/search?q=xmlhttprequest but would prefer not to use this solution if possible).
Thanks for any ideas!