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
How to trigger custom error to fire up loadError
07/07/2008
16:02
Avatar
interlee
Member
Members
Forum Posts: 20
Member Since:
13/06/2008
sp_UserOfflineSmall Offline

Hi Tony,

I know that loadError fires up when there is an error in the server script. Is there a way to trigger my own custom error message so that the loadError fuction can fire up and display the error message?

Let's say that there is an SQL in a server script and its syntax is correct.

But, its semantics are wrong and I would like to trigger an error with my own message in the server script so that the loadError in the grid fires up and display the error message.

Would there be a way for this kind thing?

Thank you!

Daniel

08/07/2008
02:52
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

header("HTTP/1.0 404 Not Found");

if you use php

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.

08/07/2008
13:36
Avatar
interlee
Member
Members
Forum Posts: 20
Member Since:
13/06/2008
sp_UserOfflineSmall Offline

Thank you Tony. It worked.

/**
 * If not logged on, display error message
 */
if ($session->checkAuthentication(false) == false)
{
    header("HTTP/1.0 404 Not found error");
    print 'The session has been expired. Please sign out and sign in again.';
    exit;
}

Best,

Daniel

16/07/2008
04:27
Avatar
josepk
Member
Members
Forum Posts: 44
Member Since:
16/06/2008
sp_UserOfflineSmall Offline

In our project , we utilize struts and Jsp, j2ee, java, and when an error

ocurs we dont generate any http header error, we are calling the same

page that has generated the error but with some message in a div.

Then when the server responds and the grid method are called, the

response of the server can be catched and parsed to see if there is an

error and then  show this error or doing whatever else.

Josep Escofet

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

Currently Online:
39 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