PDA

View Full Version : Getting JS Error in FB Linux but not in FB Windows



kenITR
8 Aug 2007, 12:51 PM
Hello:

I struggled for a while trying to find out how to insert database row ids into a grid to identify which row to update in the database until I discovered that I could load and retrieve that info from the data store.

So, I create my grid like so:


var grid = new Ext.grid.EditorGrid('managers', {
ds: dsManagers,
cm: colModel,
autoHeight:true,
autoSizeColumns:true,
selModel: new Ext.grid.RowSelectionModel({singleSelect:true})
});
grid.render();

and I update the database like so:


grid.on('afteredit', updateDB);

function updateDB(oGrid_event) {
var mgrID = dsManagers.getAt(oGrid_event.row).get("managerID");
var item = oGrid_event.field;
var value = oGrid_event.value;
var conn = new Ext.data.Connection();
conn.request({
url: "ajaxAdminRequest.php",
scripts:true,
params: {
typeID:'updateManagers',
managerID:mgrID,
item:item,
itemValue:value
}
});
};

This actually works well except that it generates a FB error in Linux but not in Windows. If I edit the grid and mouse click away from the cell, all goes well. But if I edit the grid and hit Enter, I get the following error (p.s. the database still gets updated):


[Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIDOMEvent.type]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: https://it-resourceshq.com/ext/scripts/ext-all.js :: anonymous :: line 17" data: no]

Does anyone know what could be causing this?

Thanks for your help.

Ken

devnull
8 Aug 2007, 2:50 PM
in my experience these errors have been non-fatal and are only experienced if firebug is active.
does it stop the code from executing, and does it still ocur if firbug is deactivated?

kenITR
8 Aug 2007, 7:54 PM
does it stop the code from executing, and does it still ocur if firbug is deactivated?

Nope, code executes fine and there are no errors with Firebug deactivated. So, I guess it's no worry.

Thanks.