Web focus No Data HTML Output Redirect
May 16th, 2008With web focus when you have no data returned from your query and want a simple way of redirecting the page. Use the following code example.
SET EMPTYREPORT=ON
TABLE FILE CAR
PRINT *
ON TABLE HOLD AS MYTAB FORMAT HTMTABLE
END
-RUN
-SET &HOWMANY = &LINES ;
-HTMLFORM BEGIN
-IF &HOWMANY GT 0 GOTO no.redirect ;
CONTENT="5 ;
URL=http://the page you want to redirect to">
-no.redirect
!IBI.FIL.MYTAB;
-HTMLFORM END