Hi all,
Error computing HTML/JS for Alternate View: Variable "tmpl" not found.
This was working until recently.
I have a grid with an alternate view which shows the locations on a google map from the records in the grid on the main view. If I remove the alternate view, then the grid compiles just fine. But when I add the alternate view back in, I get the above error when I go to Working Preview. I also get the attached javascript dialog box come up.
I am running version 11.2945
The alternate view has some attached javascript for moving markers, but that has been working fine since it was first written, but included here for completeness
taken from the demo video by Selwyn.
The code in the Preview Layout tab shows
So, I guess I have two questions ... one is specific to this error ... any ideas why I am getting it? and two ... with the error message I am given by Alpha 5, how do I track down errors myself going forward? The line 76 is line 76 of what? The xBasic code, or the HTML code windows ... or somewhere else?
Thanks,
Phil
Error computing HTML/JS for Alternate View: Variable "tmpl" not found.
This was working until recently.
I have a grid with an alternate view which shows the locations on a google map from the records in the grid on the main view. If I remove the alternate view, then the grid compiles just fine. But when I add the alternate view back in, I get the above error when I go to Working Preview. I also get the attached javascript dialog box come up.
I am running version 11.2945
The alternate view has some attached javascript for moving markers, but that has been working fine since it was first written, but included here for completeness
Code:
function ondrop(m,e) { ////m - pointer to the Google Maps 'Marker' object. See 'http://code.google.com/apis/maps/documentation/javascript/reference.html#Marker' for more information. ////e - contains e.rowNumber - the row number of the row whose marker you dragged // ////The following example code shows how you can update the 'latitude' and 'longitude' field in the current Grid row ////when the marker is dragged. // var lat = m.position.lat(); var lng = m.position.lng(); {Grid.object}.setValue('G','PATIENTLATITUDE',e.rowNumber,lat); {Grid.object}.setValue('G','PATIENTLONGITUDE',e.rowNumber,lng); {Grid.object}.submitGridPart(); }
The code in the Preview Layout tab shows
Code:
if(typeof jQuery != 'undefined') jQuery.noConflict(); A5._windowDefaults={title:{tools:{defaults:{'close':{action:'close',name:'close',image:'a5res:images/$$window.button.close.png'}}}}} function ondrop(m,e) { ////m - pointer to the Google Maps 'Marker' object. See 'http://code.google.com/apis/maps/documentation/javascript/reference.html#Marker' for more information. ////e - contains e.rowNumber - the row number of the row whose marker you dragged // ////The following example code shows how you can update the 'latitude' and 'longitude' field in the current Grid row ////when the marker is dragged. // var lat = m.position.lat(); var lng = m.position.lng(); GRID1_GridObj.setValue('G','PatientLatitude',e.rowNumber,lat); GRID1_GridObj.setValue('G','PatientLongitude',e.rowNumber,lng); GRID1_GridObj.submitGridPart(); GRID1_GridObj.submitDetailView(); } var windowName = 'WINDOW_81b9827a_35f9_48d6_b3f2_e0afa0453162'; GRID1_GridObj.createWindow(windowName,'modal-resizable', { body: { content: { type: 'element', elementId: 'SightTestsDiv' } }, height: '', width: '', title: { html: 'TemporaryTitle', show: true, location: 'top' }, disableMove: false, theme: 'OMSLargeStandard', animation: { show: { type: 'fade', duration: 'slow' }, hide: { type: 'none', duration: 'fast' } } } ); window['GRID1_G_ACTIONBUTTON_SHOWSIGHTTESTS_1'] = function(objEle) { var rowNum = GRID1_GridObj._selectedRow; var rowId = $u.s.tran(rowNum,'-','_'); var windowName = 'WINDOW_81b9827a_35f9_48d6_b3f2_e0afa0453162'; var currWindow = GRID1_GridObj.getWindow(windowName); currWindow.show(); currWindow.setTitle('Sight test details for '+GRID1_GridObj._getValue('G','PATIENTNAME',rowNum)+'') } var windowName = 'WINDOW_d826dd73_d23f_473e_afcb_cf354e8b496d'; GRID1_GridObj.createWindow(windowName,'modal-resizable', { body: { content: { type: 'element', elementId: 'CLVisitsDiv' } }, height: '', width: '', title: { html: 'TemporaryTitle', show: true, location: 'top' }, disableMove: false, theme: 'OMSLargeStandard', animation: { show: { type: 'fade', duration: 'slow' }, hide: { type: 'none', duration: 'fast' } } } ); window['GRID1_G_ACTIONBUTTON_CONTACTLENSVISITS_1'] = function(objEle) { var rowNum = GRID1_GridObj._selectedRow; var rowId = $u.s.tran(rowNum,'-','_'); var windowName = 'WINDOW_d826dd73_d23f_473e_afcb_cf354e8b496d'; var currWindow = GRID1_GridObj.getWindow(windowName); currWindow.show(); currWindow.setTitle('Contact lens visits for '+GRID1_GridObj._getValue('G','PATIENTNAME',rowNum)+'') } var windowName = 'WINDOW_44cdab81_e18e_449e_91f5_ec3ce82fad28'; GRID1_GridObj.createWindow(windowName,'modal-resizable', { body: { content: { type: 'element', elementId: 'TillRecordsDiv' } }, height: '', width: '', title: { html: 'TemporaryTitle', show: true, location: 'bottom' }, disableMove: false, theme: 'OMSLargeStandard', animation: { show: { type: 'fade', duration: 'slow' }, hide: { type: 'none', duration: 'fast' } } } ); window['GRID1_G_ACTIONBUTTON_TILLRECORDS_1'] = function(objEle) { var rowNum = GRID1_GridObj._selectedRow; var rowId = $u.s.tran(rowNum,'-','_'); var windowName = 'WINDOW_44cdab81_e18e_449e_91f5_ec3ce82fad28'; var currWindow = GRID1_GridObj.getWindow(windowName); currWindow.show(); currWindow.setTitle('Till transactions for '+GRID1_GridObj._getValue('G','PATIENTNAME',rowNum)+'') } $a.simple = function() {}; Error computing HTML/JS for Alternate View: Variable "tmpl" not found
Thanks,
Phil