Welcome to the dBforums forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions, articles and access our other FREE features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload your own photos and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact support.

If you prefer not to see double-underlined words and corresponding ads, place your cursor
here for ContentLink opt out.

Go Back  dBforums > Data Access, Manipulation & Batch Languages > ASP > response.redirect

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 10-07-04, 09:08
gop373 gop373 is offline
Registered User
 
Join Date: Aug 2004
Posts: 77
response.redirect

Hi

I have button in page index.asp. When user clicked this button , it will go to responsepage.asp. I want to show message "Thank you" for 5 sec before redirect to showlist.asp. In other word, it is somthing like when you post topic or post any answer in this forum. YOu will see message before it will redirect you to main forum. I tried this code but it does not work. It did not show message, it just redirected to showlist.asp. I want to show message message first before redirect

This is responsepage.asp
<!--#include file="connect.asp"-->

<%
Dim timeold
timeold=Timer()
response.write "Thanks you<br>"
Do Until (Timer() >= (timeold+5)) OR (Timer() < timeold)
Loop
response.redirect "showlist.asp"
%>
Reply With Quote
  #2 (permalink)  
Old 10-07-04, 11:35
KlansMan KlansMan is offline
Registered User
 
Join Date: Apr 2004
Posts: 50
Hi Try This After The <Title></Title> Tag in your responsepage.asp
<Meta http-equiv ="Refreash" Content ="5";URL="showlist.asp">

Content = The Number Of Seconds
URL = Page Name With Path If Its Not In The Same Directory That you Want To Redirect To

Regards

KM
Reply With Quote
  #3 (permalink)  
Old 10-07-04, 20:34
rokslide rokslide is offline
Coffee Minion
 
Join Date: Nov 2003
Location: Sydney
Posts: 1,515
slight change to fix a typo....
Code:
<Meta http-equiv ="Refresh" Content ="5";URL="showlist.asp">
Reply With Quote
  #4 (permalink)  
Old 10-08-04, 05:41
gop373 gop373 is offline
Registered User
 
Join Date: Aug 2004
Posts: 77
Hi
I see the message Thanks but the page doesn't redirect to showlist.asp !!!
Reply With Quote
  #5 (permalink)  
Old 10-08-04, 06:09
rokslide rokslide is offline
Coffee Minion
 
Join Date: Nov 2003
Location: Sydney
Posts: 1,515
Try another version...... can't remember the exact format...
Code:
<Meta http-equiv ="Refresh" Content="5;URL=showlist.asp">
Reply With Quote
  #6 (permalink)  
Old 10-08-04, 08:06
Ryker Ryker is offline
Registered User
 
Join Date: Nov 2003
Location: Sussex, England
Posts: 404
Response.Redirect

I could be wring, but I think what you're trying to do won't work in .asp.

A response.redirect won't work afte rthe headers are written. If you have a response.write anywhere in the code before a reponse.redirect that will prevent the response.redirect from functioning.

I hate to say this, but if you wrote your page using .aspx (the asp.net framework) it might work as REsponse.Redirect under .net seems to function differently.

Of course you need to be on a .net server.

Another solution would be to set up a JavaScript alert box (dunno if response.redirect will work after that but ir might) , or a Java script function on a submit foem with a message then then a return value which allows the form to submit (bit complex though
).
Reply With Quote
  #7 (permalink)  
Old 10-08-04, 08:22
rokslide rokslide is offline
Coffee Minion
 
Join Date: Nov 2003
Location: Sydney
Posts: 1,515
Ryker, you are correct, the method he suggested _orginally_ won't work. The meta tag will work.

You can use java but for this it is over kill. btw, we tested the syntax and it appears correct.
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On