News:

Follow us on Bluesky!

Main Menu

redirect issue

Started by Saleh, October 09, 2003, 03:56:52 AM

Previous topic - Next topic

Saleh

I want to know how can I delay redierct process to show some info first like vB has ?
can I do it with Header() or I need something else ?

thanks in advance

We don't need a reason to help people

[Unknown]

You'd change redirectexit to output html using an html meta refresh or a header to tell it to refresh...

I forget exactly how, but someone will tell you ;P.

-[Unknown]

Saleh

#2
Quote from: [Unknown] on October 09, 2003, 04:48:25 AM
You'd change redirectexit to output html using an html meta refresh or a header to tell it to refresh...

I forget exactly how, but someone will tell you ;P.

-[Unknown]
lol .. actually I ,also, forgot the html refresh tag :P that's why I asked ...  :D

We don't need a reason to help people

Tyris

<meta HTTP-EQUIV=Refresh CONTENT="5; URL=urllocation.html">

thats the html refresh tag ^_^
I always forget it too... but had it in a near empty document on my desktop.

Saleh


We don't need a reason to help people

writeto

It is bad html practice to use refresh because on some browser you will lose the ability to use th back button.

Tyris

well... you can click the back button twice really quickly ;)
but yeah.. it is pretty dodgy...
still has its use tho.

Saleh

Quote from: writeto on October 09, 2003, 03:20:33 PM
It is bad html practice to use refresh because on some browser you will lose the ability to use th back button.
do you have a better way ?
because I noticed that it wouldn't work if I 'Backwarded' to the redirect page ..

We don't need a reason to help people

writeto

<HTML><HEAD><TITLE></TITLE>
<SCRIPT LANGUAGE="Javascript">
        var x = 10
        var y = 1

        function startClock()
   {
           x = x-y
           document.frm.clock.value = x
           setTimeout("startClock()", 1000)
           if(x==0)
      {
             location.replace("http://google.com");
           }
        }
</SCRIPT>
</HEAD>

<BODY onLoad="startClock()">
This page will redirect in :
<FORM NAME="frm">
<INPUT TYPE="TEXT" NAME="clock" SIZE=2 >
</FORM>
</BODY></HTML>



writeto

#9
Formatting got a little screwed up but oh well. If you don't want to use javascript I don't know a better way but I am far from a web guru like [Unknown].

Andrew

Edited to boost ego of [Unknown]

[Unknown]

You could send a header to the client... I think it's something like this:

Refresh: 1; http://www.google.com/\n

(this *should* send the client to Google after one minute.  I MAY BE WRONG.)

The reason you DON'T want the back button to work is because using it may cause a repost of form data.

-[Unknown]

Saleh

writing for writeto :P : that seems useful but is x seconds or miliseconds ?

[Unknown] : I will try this but waiting one min is TOOO long for a redirect page with a small note in it :P ? I mean how can I make it less than that , e.g. 10 sec

We don't need a reason to help people

Spaceman-Spiff

the html refresh should be in seconds, not minutes, example:
<meta http-equiv="refresh" content="5; url=http://www.simplemachines.org">
meaning: in 5 secs u'll be redirected to sm.org
put the code inside <head> tag

[Unknown]

Hmm.. I think I meant seconds, whatever.

x is in seconds on the Javascript.

writeto, I'm definitely not all knowing - far from.

-[Unknown]

writeto

x is seconds, sorry I wrote that sloppy I should have let you know.

[Unknown] I realize you aren't all knowing but take a compliment.

Saleh

ok thanks writeto , I will use this script for sure since the refresh header [Unknown] provided does NOT work in my machine :P

We don't need a reason to help people

[Unknown]

See, that proves I'm not all knowing.

-[Unknown]

writeto

Fine, I always lose when I argue with you...

Andrew

Saleh

actually it refreshes the page but does not go to the page we assigned next to the refresh header ..

QuoteSee, that proves I'm not all knowing.
there is no need for a proof , there is NO one in this earth who knows something %100 .. so no need to argu this ..
altho I think [Unknown] knows ALOT about PHP :D

We don't need a reason to help people

Advertisement: