Forum


Part of my code is not working, the error appears when i made a detail code, in firefox everything seems OK, no error was found with firebug, but in ie7 nothing appears except the html code.
I recently installed DebugBar for ie6 and an error appears on line 130 "colModel:[...." with the error message "Expected identifier, string or number".
I need this grid to work in both navigators, please can you help me?
This is my code:
jQuery("#list2").jqGrid({
url:'search.php?q=1&proy='+proyecto+'&aj='+aj,
datatype: "json",
mtype:'GET',
colNames:['Id','Activo', 'Comp.', 'Anterior','Ingreso','asignado','Nuevo'],
//colNames:['Id','Idinv', 'Inventario', 'Comprobante','bs','us','eu','denominacion','Adquisición','Actual','Observaciones','Estado','Traspaso','Ubicación'],
colModel:[
{name:'idinventario',index:'idinventario', width:55, editable: true, editoptions:{readonly:true,size:10}},
{name:'tipoactivo',index:'tipoactivo', width:90, editable: true, edittype:"select", editoptions: {value: "Muebles:Muebles;Equipos de Computacion:Equipos de Computación;Artefactos:Artefactos;Electrodomesticos:Electrodomésticos;Vehiculos:Vehiculos"}},
{name:'proyectosolicitante',index:'proyectosolicitante', width:50, editable:true, edittype:"select", editoptions: {value: "C1:C1;C2:C2;C3:C3;C4:C4;C5:C5;PL:PL;NP:NP;CH:CH"}},
{name:'nroinventarioanterior',index:'nroinventarioanterior', width:80, align:"right", editable:true},
{name:'fechainginventario',index:'fechainginventario', width:80, align:"right", edittype:"text", editable:true, sorttype:"date"},
{name:'asignadoa',index:'asignadoa', width:150,align:"right", editable:true},
{name:'nroinventarionuevo',index:'nroinventarionuevo', width:150, sortable:true, editable:true}
],
pager: jQuery('#pager2'),
rowNum:10,
rowList:[10,30,50,80,100,200,300],
imgpath: 'themes/sand/images',
sortname: 'idinventario',
viewrecords: true,
sortorder: "asc",
caption: "Codigos de Inventario",
height: 185,
width: 700,
editurl:"editable/editexample.php",
onSelectRow: function() {
var id = jQuery("#list2").getGridParam('selrow');
if (id)
{
var ret = jQuery("#list2").getRowData(id);
var gr=ret.idinventario;
jQuery("#list3").setGridParam({url:"searchsub.php?q=1&idinv="+gr,page:1}).setCaption("Inventario con id: "+ret.nroinventarionuevo).trigger('reloadGrid');
};
}
}); //fin de jqgrid
jQuery("#list2").navGrid("#pager2",{edit:true,add:true,del:false,search:true},
{reloadAfterSubmit:true,closeAfterEdit:true},
{reloadAfterSubmit:true,closeAfterAdd:true,
beforeShowForm : function(id){
$.post("editable/fecha.php","action=gdth",function(datos){
var invsplit=datos.split("-");
ninvnuevo=proyecto+""+invsplit[0];
var fechaingresoinventario=invsplit[1]+"-"+invsplit[2]+"-"+invsplit[3];
jQuery("#fechainginventario").val(fechaingresoinventario);
jQuery("#nroinventarionuevo").val(ninvnuevo);
})
}
},
{reloadAfterSubmit:true});
//jqgrid subgrid start
jQuery("#list3").jqGrid({
url:'searchsub.php?q=1',
datatype: "json",
mtype:'GET',
colNames:['Id','Idinv', 'Inventario', 'Comprobante','bs','us','eu','denominacion','Adquisición','Actual','Observaciones','Estado','Traspaso','Ubicación'],
colModel:[ //error showed by ie6 or maybe not???
{name:'iditem',index:'iditem', width:55, editable: true, editoptions:{readonly:true,size:10}},
{name:'idinventario',index:'idinventario', width:55, editable: true, editoptions:{readonly:true,size:10}},
{name:'nroinventario',index:'nroinventario', width:90, editable: true,},
{name:'nrocomprobante',index:'nrocomprobante', width:90, editable: true,},
{name:'costobs',index:'costobs', width:90, editable: true,},
{name:'costous',index:'costous', width:90, editable: true,},
{name:'costoeu',index:'costoeu', width:90, editable: true,},
{name:'denominacion',index:'denominacion', width:80, align:"right", edittype:"textarea", editable:true},
{name:'fechaadquisicion',index:'fechaadquisicion', width:80, align:"right", edittype:"text", editable:true, sorttype:"date"},
{name:'fechaactual',index:'fechaactual', width:80, align:"right", edittype:"text", editable:true, sorttype:"date"},
{name:'observaciones',index:'observaciones', width:80, align:"right", edittype:"textarea", editable:true},
{name:'estado',index:'estado', width:50, editable:true, edittype:"select", editoptions: {value: "Baja:Baja;Prestamo:Prestamo;Activo:Activo;Almacenes:Almacenes"}},
{name:'traspasoa',index:'traspasoa', width:80, align:"right", editable:true},
{name:'ubicacion',index:'ubicacion', width:80, align:"right", edittype:"text", editable:true},
],
pager: jQuery('#pager3'),
rowNum:10,
rowList:[10,30,50,80,100,200,300],
imgpath: 'themes/sand/images',
sortname: 'iditem',
viewrecords: true,
sortorder: "asc",
caption: "Codigos de Inventario",
height: 150,
width: 680,
editurl:"editable/editexample.php"
}); //fin de jqgrid
09:40

Moderators
30/10/2007

Hello,
Check for not needed comas. It is not neccesary that this error is in this line.
Also try first with one grid and if all goes ok try to inlude the second grid with minimal options as possible.
Regards
Tony
For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.
tony said:
Hello,
Check for not needed comas. It is not neccesary that this error is in this line.
Also try first with one grid and if all goes ok try to inlude the second grid with minimal options as possible.
Regards
Tony
Tony, everything goes OK in firefox, but in ie is not working, the second grid is very simple, but i need to do some operations like the first one. maybe if you probe this complete code you will see what kind of errors ie reports, please can i contact you by email and send to you all my code and database?
my email is: francisco.penaranda@padep.org.bo
Thanks
05:04

Moderators
30/10/2007

Hello,
The best will be if you provide me a link to the problem.
You can email me to : tony at trirand dot com
Regards
Tony
For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.
03:00

Moderators
30/10/2007

Hello,
You should have a mail from me.
Regards
Tony
For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.
Hello, Tony.
Maybe the email was bloqued by the mail server, can you please re-send your complete message to francisco.penaranda@gmail.com
Thanks
Francisco P.
Most Users Ever Online: 715
Currently Online:
51 Guest(s)
Currently Browsing this Page:
1 Guest(s)
Top Posters:
OlegK: 1255
markw65: 179
kobruleht: 144
phicarre: 132
YamilBracho: 124
Renso: 118
Member Stats:
Guest Posters: 447
Members: 11373
Moderators: 2
Admins: 1
Forum Stats:
Groups: 1
Forums: 8
Topics: 10592
Posts: 31289
Newest Members:
, razia, Prankie, psky, praveen neelam, greg.valainis@pa-tech.comModerators: tony: 7721, Rumen[Trirand]: 81
Administrators: admin: 66