Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Auto reload asp page

Posted on 2004-08-20
2
Medium Priority
?
410 Views
Last Modified: 2008-02-01
Hi experts,

This is going to sound like an odd question, but please bear with me

I have an asp page that for various convoluted, and difficult to change reasons only loads a variable half way down it, (in include files that can only be used once on the page for javascript reasons and are used elsewhere).

Very occasionally I'd like to use that variable at the top of the page.

Currently if i hit f5 and reload the page i the variable is written to a cookie and then loads in fine.

SO... what i'd really like to do is say at the bottom of the page - if condition is x then reload this entire page once automatically once.

Is that possible?
0
Comment
Question by:pjordanna
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 46

Accepted Solution

by:
fritz_the_blank earned 1200 total points
ID: 11850760
You could do:

<%
if someCondition then
   response.write("<script>location.replace(""thispage.asp"")</script>")
end if
%>

OR:

<%
if someCondition then
   response.redirect("thispage.asp")
end if
%>

OR:
<%
if someCondition then
  Server.Transfer("thispage.asp")
end if
%>
0
 
LVL 31

Assisted Solution

by:alorentz
alorentz earned 800 total points
ID: 11850762
Sure:

if session("loaded") <> 1 then
   response.redirect "thepagename.asp"
   session("loaded") = 1
end if

That will reload the page when you go to it, once per session.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have helped a lot of people on EE with their coding sources and have enjoyed near about every minute of it. Sometimes it can get a little tedious but it is always a challenge and the one thing that I always say is:   The Exchange of informatio…
This demonstration started out as a follow up to some recently posted questions on the subject of logging in: http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28634665.html and http://www.experts-exchange.com/Programming/…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…

715 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question