Forum


19:37

25/10/2008

Hello Tony and all,
I am trying to work out using last version of JqGrid 4.3.1 under IIS and Microsoft SQL Server platform using PHP+Javascript and I created a grid correctly. Just when I click to add record and I insert data, once I click to Submit using Firebug I get a POST successful with OK 200ms but it doesn't save anything and I see in XML tab response this kind of error:
XML Parsing Error: no element found Location: moz-nullprincipal:{...} Line Number 1, Column 1:
What could be?
The piece of js code to manage the grid is:
jQuery(document).ready(function(){ jQuery("#userstable").jqGrid({ url:"load_datatable.php?table_name=users&fact=add", datatype: 'json', colNames:['ID','Last Name','First Name','Account','Password'], colModel:[ {name:'ID',index:'ID',width:1,editable:false,hidden:true}, {name:'Last_Name',index:'Last_Name',width:150,editable:true,editoptions:{readonly:false,size:40}}, {name:'First_Name',index:'First_Name',width:150,editable:true,editoptions:{readonly:false,size:40}}, {name:'Account',index:'Account',width:120,editable:true,editoptions:{readonly:false,size:40}}, {name:'Password',index:'Password',width:120,editable:true,editoptions:{readonly:false,size:40}}, ], rowNum:10, rowList:[10,20,30], loadonce:false, pager: '#pagerusers', emptyrecords: 'No users found', sortname: 'Last_Name', viewrecords: true, sortorder: "desc", caption:"Users", editurl:"edit_datatable.php?table_name=users&fact=add", shrinkToFit: false // autowidth: true, }).navGrid('#pagerusers',{ edit:true,edittext:'Edit',edittitle:'Edit selected user...', add:true,addtext:'Add',addtitle:'Add new user...', del:true,deltext:'Remove',deltitle:'Remove selected user...', search:true,searchtext:'Find',searchtitle:'Find user...', refresh:true,refreshtext:'Reload',refreshtitle:'Reload users...' }, {addfunc:function(){jQuery('#userstable').editGridRow("new",{height:180,width:400,reloadAfterSubmit:true,closeOnEscape:true});}, editfunc:function(){var rowids=jQuery('#userstable').jqGrid('getCol','ID',false);var idsel=jQuery('#userstable').jqGrid('getGridParam','selrow');var id=rowids[idsel];jQuery('#userstable').editGridRow(idsel,{height:180,width:250,url:"edit_datatable.php?table_name=users&fact=edit&id="+id,reloadAfterSubmit:true,closeOnEscape:true});}, delfunc:function(){var rowids=jQuery('#userstable').jqGrid('getCol','ID',false);var idsel=jQuery('#userstable').jqGrid('getGridParam','selrow');var id=rowids[idsel];jQuery('#userstable').delGridRow(idsel,{url:"edit_datatable.php?table_name=users&fact=del&id="+id,reloadAfterSubmit:true,closeOnEscape:true});},refresh:true,search:true}, //options {height:180,width:400,reloadAfterSubmit:true,bSubmit:'Save',recreateForm:true}, // edit options {height:180,width:400,reloadAfterSubmit:true,bSubmit:'Save',recreateForm:true}, // add options {reloadAfterSubmit:true}, // del options {}); });
which it looks like just ok.
Any trick is appreciate.. thanks
Luigi
16:27

25/10/2008

Nevermind, solved by myself… it was some settings related to web.config file…
At least someone could tell me why with the code above in the first post when I press Edit button the form editor doesn't
resize as I want and with "Save" in the submit button?
If I press Add then Cancel and then again I press Edit it goes showing right resize and "Save" in the submit button...
thanks to everyone in advance!
Ciao,
Luigi
Most Users Ever Online: 715
Currently Online:
52 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