Hi I am using the connect to setup the onChange event but it is not firing – no errors being generated and I am at a loss as to what the problem is.
<select name='value(serviceRefId)' dojoType='dijit.form.FilteringSelect' id='serviceRefId'>
<option value='0'></option>
<option value='10109'>General Surgery</option>
<option value='10108'>Internal Medicine</option>
<option value='10111'>Laboratory</option>
<option value='10113'>Other</option>
<option value='10112'>Paediatrics</option>
<option value='10110'>Radiology</option>
</select>
<script type="text/javascript">
dojo.addOnLoad(function(){
dojo.connect(dojo.byId("serviceRefId"), 'onChange', function(event){
alert('ok ' + event);
});
});
</script>
There is no onChange on the DOM element, which will fire. Instead there is an event in the form dijit (widget) which has that name – but you’d need to use
dijit.byIdto get that component.Try this