Forum


02:09

17/09/2008

i m using latest version for jqgrid 3 .2
beforeSubmit:ValidateForm()
this code i wrote as in documents and pdf
function ValidateForm()
{
alert();
}
i hv written this much code but when grid is loaded it will display alert
msg,then i write code in grid.formedit-min.js
ret=p.beforeSubmit(postdata,$(”#”+frmgr));
after this line i hv puted one condition
if(validateForm(postdata)==false ){
return false;
}
but it is also not working ………………..
09:56

Moderators
30/10/2007

Hello,
What do you try to do?
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.
04:56

Moderators
30/10/2007

Hello,
You can not use beforeSubmit this way. The right is
....navGrid("#pager_id",{...},
//add options
{ beforeSubmit : function (postdata, formid) {
if( ValidateForm(postdata) == false) {
return [false,"MessageError",""];
} else {
return [true,"",""]
}
}
} end add
.....continue for otheres
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.
03:12

06/07/2009

Hi Tony (or anyone reading this),
Could you elaborate or point me to a doc that details how to format the result?
return [false,"MessageError",""];
That look like it invalidates the entire add/update form. Is there a way I can send something back so the add/update form displays error messages for a given field?
Thanks in advance!
00:55

Moderators
30/10/2007

Hello,
In this case you should check manually what is the error for particular filed and then to write:
return [false,"Field MyFiled: You enter invalid value!",""];
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.
Most Users Ever Online: 715
Currently Online:
61 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