[ic] A 'timed' BOUNCE

Barry Treahy, Jr. interchange-users@icdevgroup.org
Mon Aug 19 16:50:02 2002


Kevin Walsh wrote:

>>>I've had no luck identifying how to do this, and I presume it would be 
>>>possible with normal ITL, but perhaps not.  What I want to do, is if a 
>>>person is bounced to a page, that after a 'timeout' period bounce them 
>>>to another page.
>>>
>>>I'm pretty sure that I can do this in Perl, with the sleep function and 
>>>perhaps calling the ITL tage, but is there a simplier way that I'm just 
>>>being 'blind' about?
>>>
>>>      
>>>
>>    push @OUT,join '',
>>    q`[tag op=header interpolate=1]`,
>>    qq`Content-Type: text/html\n`,
>>    qq`Refresh: 1; URL=$header`,
>>    q`[/tag]`;
>>
>>    
>>
>In your <head> section, you could add this sort of thing:
>
>    [if scratch autorefresh]
>    <meta http-equiv="refresh" content="1; url=[scratch autorefresh]">
>    [/if]
>
>Then each page that wants to auto-refresh to another page should only
>need to add the following code before calling the template:
>
>    [tmp autorefresh][area otherpage][/tmp]
>
>
>The [tag] code, suggested above, should work as well, but I think it
>may look better written like this:
>
>    [tag op=header interpolate=1]
>    Content-Type: text/html
>    Refresh: 1; URL=[area somepage]
>    [/tag]
>
>Or in [perl] or [calc] etc., using $Tag->tag() and $Tag->area().
>
>  
>
Humm... Ok, the problem.  I really do not want to put the meta statement 
into the HTML header because I'm using standard includes, and that would 
require me to define the refresh values prior to entering the page, an 
error page that I'm not expecting to hit unless they turn off Java or 
Cookies mid-stream....

I tried the [tag] suggestions, both as a perl PUSH and as the straight 
ITL, and neither redirected.

I also tried my original thought of doing it all in Perl and it appears 
that IC will not let me use sleep as SAFE is trapping it.  

So, is my only option in fact embedding the meta data into the header???

Barry

-- 

Barry Treahy, Jr  *  Midwest Microwave  *  Vice President & CIO 

E-mail: Treahy@mmaz.com * Phone: 480/314-1320 * FAX: 480/661-7028