Notice the alert() - calling Form.submit() directly doesn't activate the onsubmit event handler, while simulating a submit button click does - important if you're using the handler for validation routines. Your choice. Set the .selectedIndex==number to the submitting option number (Javascript counts from zero).
Comment