I have added some code to automatically submit the form when a selector is changed:
<select name="template" id="templateselector" onchange='this.form.submit()'>
{{foreach $templates as $t}}
<option value="{{$t}}"{{if $t==$template}} selected="selected"{{/if}}>{{$t}}</option>
{{/foreach}}
</select>
The bracket tags come from my template engine.
When the page is first loaded, and an entry of the select list is selected, the form submits. It then pre-selects the selected item in the list (selected="selected").
But when the item is pre-selected, the on submit action no longer works. Why is that?