I believe you can't do this directly from the Data Object's event.

What you can try is:

1. set a flag (instance variable ) of  the Result page from the DataObject's
event: (This flag has to be reset in this_onBeforeDisplayEvent() or so)
==============
CSpPage nextPage = CSpider.getPage("pgError");
nextPage.dbError = true;                
==============

2. In the Result Page, detect this flag at the earliest point and do
==============
if (dbError) {
    CSpHtml.reset();
    load("pgError");
}
==============
I guess this_onAfterDataObjectExecute() should be the right place to do
this.

this_OnBeforeHtmlOutputEvent() will work, might be a slight amout of waste.


Aby

> -----Original Message-----
> From: [EMAIL PROTECTED] [SMTP:[EMAIL PROTECTED]]
> Sent: Friday, May 21, 1999 2:08 PM
> To:   [EMAIL PROTECTED]
> Subject:      [ND] Search page - overriding the page that the results are
> being sent to with another page
> 
> When I get 0 records returned from an implicit query I want to load an
> Error page
>        instead of loading the page that the results were initially set to
> go to.  The Error
>        page loads ok, but it copies it on top of the origianl page, so I
> have two different
>        pages loaded on my screen.  Any idea on how to load the Error page
> only.
> My code in the dataobject:
> if 0 records returned {                                               
>               CSpPage nextPage = CSpider.getPage("pgError");
>               nextPage.load("pgError");               
>               return (PROCEED);
> _________________________________________________________________________
> 
> For help in using, subscribing, and unsubscribing to the discussion
> forums, please go to: http://www.netdynamics.com/support/visitdevfor.html
> 
> For dire need help, email: [EMAIL PROTECTED]
_________________________________________________________________________

For help in using, subscribing, and unsubscribing to the discussion
forums, please go to: http://www.netdynamics.com/support/visitdevfor.html

For dire need help, email: [EMAIL PROTECTED]

Reply via email to