EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: notaprgrmr on January 08, 2016, 08:04:10 AM



Title: Save dialog not closing; updating datagrid
Post by: notaprgrmr on January 08, 2016, 08:04:10 AM
From the tutorial, which works correctly - the save button on the basic CRUD datagrid is supposed to close the dialog and then reload the data grid to display the new row.  However, on my system it is not doing that, it just sits there.  I can hit save multiple times and nothing happens - meanwhile on the backend I can query the database and see it actually is inserting the records correctly (once per time I hit save).   If I cancel out of the save dialog (after hitting save) and then reload the datagrid, the new row is displayed.   Interestingly enough; the edit dialog seems to work properly; after I make changes I hit save and it closes the form and updates the datagrid which shows the changes.   Any thoughts on what could be going on with the save dialog?

I also downloaded the tutorial and opened the index.html and copied out the functions exactly and get the same thing.  I've tried in Firefox and IE and it doesn't seem happy.  My file isn't called "index.html" but I wouldn't think that would matter. 

One difference is that I implemented a connection class in the php and store the server info/credentials in an ini file - but since everything works (and my data is actually inserted), I suspect this is some weird issue with the dialog box.  I also named my php files differently since I had to include the class initialization; but again; the data saves; the dialog box won't close and refresh the datagrid.  And I changed the size of the actual datagrid; but that should have no impact either.

Any ideas what could be the issue?





Title: Re: Save dialog not closing; updating datagrid
Post by: stworthy on January 08, 2016, 06:40:57 PM
When saving a row, please check your server code to see what data returned to the browser. An illegal data may cause some errors on the browser and broke running the script.


Title: Re: Save dialog not closing; updating datagrid
Post by: notaprgrmr on January 11, 2016, 07:29:49 AM
Thanks stworthy.   I was thinking all was fine because I received no messages.   I hadn't thought to look at the apache error log.   The issue was that when I implemented the database connection class I also had changed things to use mysqli instead of mysql.   I needed to specify my connection on the mysqli_insert_id function in the save_user php code.  Works fine now.  Appreciate the help!