Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Refresh after Redirect

Status
Not open for further replies.

JrClown

Technical User
Oct 18, 2000
393
US
Hello all,
How can I make a main page auto refresh after a redirect??
Here's what I have:
User fills a form out, submits. Data then is entered into Access DB. If user clicked on specific fields in the form, he\she get's redirected to a "MainPage.asp" displaying the results of those fields. With me so far?
How do I make the MainPage.asp autorefresh?? right now, the user has to refresh the page to view what he\she filled out.

I'm using this simple syntax
<%
response.redirect &quot;MainPage.asp&quot;
%>
QUOTE OF THE DAY
&quot;The most important ingredient in the formula of success is knowing how to get along with people&quot;
<%
Jr Clown
%>
 
why not pass along a variable in the autodirect, say

Response.redirect &quot;mainpage.asp?refresh=true&quot;

then use the ASP page to pase for the variable. I'm not sure if you needed the mainpage.asp to refresh, or if you spawned another window holding mainpage.asp. At any rate, if you need mainPage.asp to refresh, then do a simple conditional.

if Cbool(Request.QueryString(&quot;refresh&quot;)) then
Response.redirect(&quot;mainpage.asp?refresh=false&quot;)
end if

If you need the parent window to refresh, then just stick the variable into somme javascript, and use some of javascripts window control methods to refresh it. I'm sorry that I don't know it off the top of my head, but this should get you thinking in the right direction.

hope i helped.
leo
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top