<script>
$('Machine_location_id').observe("change", function (event) {
console.log("here");
var pars = "loc_no=" + $F('Machine_location_id');
new Ajax.Updater('load_floor', '/adminctrls/loadfloormachine', {
parameters: pars
});
});
function load_floor() {
console.log("here");
var pars = "floor_no=" + $F('Machine_floor_id');
new Ajax.Updater('load_cubicle', '/adminctrls/loadcubiclemachine', {
parameters: pars
});
}
</script>
In this ajax code, the floors under that location should be loaded when a location is selected. This is working fine but I am unable to load them in jquery mobile, how can I fix this?