Forum


18:25

22/11/2011

I have validation function :
jQuery("#grid").jqGrid('navGrid','#pager',{add:true,edit:true,del:false},
{beforeSubmit:validatedata,closeAfterAdd: false,closeAfterEdit: false } ); function validatedata( postdata,formid) {
var message="11111111111111″;
var complete=false;
$.ajaxSetup({ cache: false });
$.ajax({
type : 'POST',
url : 'd_eval.php',
dataType : 'json',
data: postdata,
success : function(postdata) {
complete=false;
message=postdata.msg;
message='2222222222222'; }
});
alert(message); // Strange !!!
return [complete,message] ;
}
IF i put alert before return , all is ok (i can see message '2222222222222' on the top of edit form. If there is no alert on the top is just first message '11111111111111' ! Is this a bug or i miss something?
15:38

22/11/2011

Hi again OlegK,
Can you help me little bit more ? Because I want to know which action is started from editing form , I tried beforeCheckValues Event. The documentation say that we have 3 parameters ( postdata,formid,mode) . When i use this event i receive just (postdata AND formid ) Parameter mode -miss. The validation function is abs. the same (with 3 parameters) .
function validatedata( postdata,formid,mode)
23:15

10/08/2009

Hello,
I ocationally find your question because I don't subscribed the topic: one has on the stackoverflow more better notification system as here.
Abou your question I don't full understand your problem. How I can see from the fist look at the source code the documatation is correct and beforeCheckValues will be really called with 3 parameters. So if you don't receive the 3-d parameter you should post the code which you use. On the other side I don't understand why the 3-d parameter can be interesting bacause you can define separate parameters for Add and for Edit forms (see prmEdit and prmAdd parameters of navGrid).
Best regards
Oleg
Most Users Ever Online: 715
Currently Online:
50 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