I've created a FullCalendar with link to open modal box showing info on the selected entry with the code like this:
$('#eventUrl').attr('href',ew.modalDialogShow({lnk:this,url:'UserEditAppointmentEdit/'+info.event.id}));
The page UserEditAppointmentEdit is from a View table and has a drop-down box on one of the fields. The page loaded directly from URL works fine with no errors.
But when the page is called as modal from the calendar link above, the drop-down box shows only a single entry with current value only. The F12 browser console shows error message: "Uncaught TypeError: Cannot read property 'user_edit_appointment' of undefined".
Clicking the debugger link takes to the Sources page which highlights the offending code fragment: "var fields = ew.vars.tables.user_edit_appointment.fields;". The rest of the code before and after is a typical PHPMaker created JS page code and this offending portion forms part of the "loadjs.ready("head", function () {" page creation code.
If I replace the page by UserEditAppointmentView everything works fine. If I replace it by another regular table also the same things happens: View mode of the page works, but Edit mode of the page fails with the same error message referencing the new table.
This is all very new and I've no idea what this means. Please guide on how to use the Edit mode instead of View mode.
With thanks for your help!