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
beforeSubmit
18/09/2008
02:09
Avatar
sima
Member
Members
Forum Posts: 3
Member Since:
17/09/2008
sp_UserOfflineSmall Offline

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 ………………..

18/09/2008
09:56
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

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.

22/09/2008
23:16
Avatar
sima
Member
Members
Forum Posts: 3
Member Since:
17/09/2008
sp_UserOfflineSmall Offline

hi i m reying to do validation with jqgrid so how to do tht ? 


23/09/2008
04:56
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

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.

12/08/2009
03:12
Avatar
the_cubanate
New Member
Members
Forum Posts: 2
Member Since:
06/07/2009
sp_UserOfflineSmall Offline

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!

13/08/2009
00:55
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

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.

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