CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Beginner:
Hi - delaying page redirection?

 



ee91gg
Deleted

Apr 21, 2000, 10:30 AM

Post #1 of 8 (1196 views)
Hi - delaying page redirection? Can't Post

Hi again, another query,
i'm currently designing a sophisticated Chat Board. I want my script to serve some tailored html, wait a few seconds, then move back to the main page automatically. <meta... refresh url...> doesn't work of course. Getting the script to print Location: $url doesn't either because the script has already served html. I've tried putting;

sleep 5;
print "Location: $url";

in a separate script and executing that from by origional script, but that doesn't work either. Is there any way it can be done? Is perl magical enough?


ee91gg
Deleted

Apr 20, 2000, 10:24 PM

Post #2 of 8 (1196 views)
Re: Hi - delaying page redirection? [In reply to] Can't Post

Thanks again cure, your an absolute star, you must pop in and say hello once i've finished my website.......

........but;

how exactly can you code those "" 's into a print command? The man pages din't seem to be very helpful in that respect. I've tried using the ascii 022 (as \022) but it's the wrong character. Any ideas?


Cure
User

Apr 21, 2000, 8:30 AM

Post #3 of 8 (1196 views)
Re: Hi - delaying page redirection? [In reply to] Can't Post

Hi

you couldnt get the refresh tag to work? try it this way

<META HTTP-EQUIV="Refresh" content="4;URL=xxxxx.html">


Cure


Cure
User

Apr 21, 2000, 1:05 PM

Post #4 of 8 (1196 views)
Re: Hi - delaying page redirection? [In reply to] Can't Post

Hi

Im lost on this part-->[how exactly can you code those "" 's into a print command?]

Can you explain, so I can help.


bye the way,-> you think I'm an absolute star --> thxs-> I really appreciate the compliment.


Cure



ee91gg
Deleted

Apr 21, 2000, 1:46 PM

Post #5 of 8 (1196 views)
Re: Hi - delaying page redirection? [In reply to] Can't Post

What i mean is, if i try running;

print " <html><head><META HTTP-EQUIV="Refresh" content="4;URL=xxxxx.html"> ";

i get errors on my system saying that it does not regognise;

Refresh" content="4;URL=xxxxx.html"> "

because when it parses the second " it thinks it has come to the end of the print command. Surely i need to use an escape sequence \somenumber to encode the " 's within the print statement?


brian.hayes
User

Apr 21, 2000, 1:52 PM

Post #6 of 8 (1196 views)
Re: Hi - delaying page redirection? [In reply to] Can't Post

Try this.

print qq~
<META HTTP-EQUIV="Refresh" content="4\;URL=xxxxx.html">
~;

Brian Hayes

[This message has been edited by brian.hayes (edited 04-21-2000).]

[This message has been edited by brian.hayes (edited 04-21-2000).]


ee91gg
Deleted

Apr 21, 2000, 2:09 PM

Post #7 of 8 (1196 views)
Re: Hi - delaying page redirection? [In reply to] Can't Post

thanks brian, that's really useful


Cure
User

Apr 21, 2000, 4:18 PM

Post #8 of 8 (1196 views)
Re: Hi - delaying page redirection? [In reply to] Can't Post

Hi

There is more than one way to quote a quote. Have you heard of escaping
characters like "a \"quote\" in a string"? Or other ways that avoid all those escapes like qq using any character or bracket type not in the string to mark each end:

print qq(<META HTTP-EQUIV="Refresh" content="4;URL=xxxxx.html"> );

or

print qq!(<META HTTP-EQUIV="Refresh" content="4;URL=xxxxx.html">!;

and etc.


Cure

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives