Forum

November 2nd, 2014
A A A
Avatar

Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

The forums are currently locked and only available for read only access
sp_Feed Topic RSS sp_TopicIcon
ret is undefined
10/02/2009
22:04
Avatar
rsea
Member
Members
Forum Posts: 17
Member Since:
24/01/2009
sp_UserOfflineSmall Offline

Hello

When I add an item to my grid I get this error:

ret is undefined
complete()()grid.formedit.js (linha 300)
complete()jquery.js (linha 3533)
onreadystatechange()()jquery.js (linha 3485)
> [Image Can Not Be Found] if(ret[0] === false) {
What happens is that the save windows is not closed and the ajax request don't finish. When I check my DB the item was added, if I reload (F5) it appears on the grid.
I'm not sure what is this. I tried to find out if was the return message I sendfrom server side file but the other grid I have works just like this one and works fine…
What am I missing?
Thanks,
Rodolfo

10/02/2009
22:48
Avatar
rsea
Member
Members
Forum Posts: 17
Member Since:
24/01/2009
sp_UserOfflineSmall Offline

Ok. I fixed the error but the ajax still dont finish its request, the Loading... message dont disapear.  I was wrong about the other grid being fine. It haves the same problem, I add an item but the add modal dont close after success.

Help?

Rodolfo.

11/02/2009
00:36
Avatar
tony
Sofia, Bulgaria
Moderator
Members

Moderators
Forum Posts: 7721
Member Since:
30/10/2007
sp_UserOfflineSmall Offline

Hello,

There is a option for this. Look into the docs. Look at your events. Some of them must return [true,''] or [false,'']. Look if you request is valid. What they return?

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.

11/02/2009
02:59
Avatar
rsea
Member
Members
Forum Posts: 17
Member Since:
24/01/2009
sp_UserOfflineSmall Offline

Hi Tony,

Usually I ask them to return {status: 0} if ok or an error code otherwise. I've tried to echo [true] and I still get the “updating database”/ajax busy message, tried [true,''] too and nothing. \\

When you said there was an option for this you mean the “afterSubmit” event ? (im using editGridRow)

BTW how I disable the red message? I have a personalized one… disabling at the grid didnt disabled this one.

Thank you,

Rodolfo.

>> Edit: I don't get the ret undefined message anymore. but the add modal is still on top and dont close, actually, stop responding and the ajax busy message don' t disappear.

The code I use to add a row:

function addrow(table) {
  $("#"+table).editGridRow( "new" ,{
    url: '/services/add_item.php',
    width : 420, height: 510,
    closeAfterAdd: true,
    afterSubmit: function(){
      var rows = $("#"+table).getGridParam('rowNum');
      rows = rows + 1;
      $("#"+table).setGridParam({rowNum: rows});
    }
  });
};

11/02/2009
16:18
Avatar
rsea
Member
Members
Forum Posts: 17
Member Since:
24/01/2009
sp_UserOfflineSmall Offline

Ok… I won the “stupid of the year”  prize.

The part:

afterSubmit: function(){
      var rows = $('#list').getGridParam('rowNum');
      rows = rows + 1;
      $('#list').setGridParam({rowNum: rows});
    }

was the problem. And there was no real need for it..

It is all okay now, except for how turn off the loadui form saving/editing modal and the alignment problem which is in another post…

Thank you!

Rodolfo.

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

Currently Online:
34 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.com

Moderators: tony: 7721, Rumen[Trirand]: 81

Administrators: admin: 66

Comments are closed.
Privacy Policy   Terms and Conditions   Contact Information