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
Problem with aftersubmit. Help me!
29/10/2010
21:24
Avatar
larosal
Member
Members
Forum Posts: 21
Member Since:
13/07/2010
sp_UserOfflineSmall Offline

Hi!

Help me!

Could you please send me an example of the aftersubmit event, what happens, the adding and the updating didn't work for me, both side, the client side and server side. I'm desperate.

Thanks in advance!

30/10/2010
02:00
Avatar
OlegK
Germany
Member
Members
Forum Posts: 1255
Member Since:
10/08/2009
sp_UserOfflineSmall Offline

First of all the name on the event is afterSubmit and not aftersubmit. The usage is very simple:

$('#list').jqGrid('navGrid',
                  {/*options*/},
                  {/*edit options*/
 
                   afterSubmit: function(response, postdata) {
                        // for example the JSON data send from the server
                        var res = jQuery.parseJSON(response.responseText);
                        // do something and return 
                        return [true, ""];
                    }
                  },
                  {/*add option*/
                    afterSubmit: function(response, postdata) {
                        // for example the JSON data send from the server
                        var res = jQuery.parseJSON(response.responseText);
                        // do something and return 
                        return [true, "", newId];
                        // where newId you construct from the server data
                    }
                  });

You can also search for different examples of the stackoverflow: http://stackoverflow.com/search?q=%5Bjqgrid%5D+afterSubmit

Best regards
Oleg

30/10/2010
04:05
Avatar
larosal
Member
Members
Forum Posts: 21
Member Since:
13/07/2010
sp_UserOfflineSmall Offline

Thank you very much, how can I do for the server side?...

Sorry for my English

30/10/2010
17:11
Avatar
OlegK
Germany
Member
Members
Forum Posts: 1255
Member Since:
10/08/2009
sp_UserOfflineSmall Offline

Sorry, but your question is too general. You don't write any information about the language and technology which you use on the server side. Moreover it is also importans which technique you use to hold to access to the database.

Regards
Oleg

30/10/2010
21:43
Avatar
larosal
Member
Members
Forum Posts: 21
Member Since:
13/07/2010
sp_UserOfflineSmall Offline

Thank very much for your answer, what I do, it's with PHP and MySQL is the DB, when something is wrong I do with a "echo", is just that I do.

Sorry for my English

01/11/2010
18:42
Avatar
larosal
Member
Members
Forum Posts: 21
Member Since:
13/07/2010
sp_UserOfflineSmall Offline

Is it correct to do what I'm doing?

Sorry for my English

Thank you

01/11/2010
18:49
Avatar
larosal
Member
Members
Forum Posts: 21
Member Since:
13/07/2010
sp_UserOfflineSmall Offline

OlegK,

Is it correct to do from the server side?     

$response->responseText = "string";
echo $json->encode($response);

Sorry for my English

Thank you

01/11/2010
19:32
Avatar
OlegK
Germany
Member
Members
Forum Posts: 1255
Member Since:
10/08/2009
sp_UserOfflineSmall Offline

Hello larosal,

I don't use PHP or MySQL. Probably other people can help you.

Regards

Oleg

01/11/2010
19:48
Avatar
larosal
Member
Members
Forum Posts: 21
Member Since:
13/07/2010
sp_UserOfflineSmall Offline

Oleg,

Thank you for your immediate answer, but nobody answer me, you has been the only.

Probably, you can guide me to another blog address, can't you, please?

Regards

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

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

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

Administrators: admin: 66

Comments are closed.
Privacy Policy   Terms and Conditions   Contact Information