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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do you refresh page on entry? 2

Status
Not open for further replies.

meeble3

Programmer
Nov 8, 2004
52
GB
Hello,

Is there a way to refresh a page as soon as you go to it then refresh every 5 minutes.

Thanks

James
 
I think you should write a COM object that installs with the page... maybe a browser helper object.

Most users won't think twice before Clicking OK on the download dialog box it throws up so you don't have to worry about that "certificate" nonsense. Besides, it is expensive to do it that way.

So anyway, you convice your users to load your code onto their system. The code can call the Windows API to put itself to sleep for 5 minutes.

Then, when it wakes up, it can examine the IE windows and look for a ? in the querystring!
 
Another approach might be to do it all server side using ASP and MTS/COM+

The only purpose of the ASP page would be to pass the entire Request object off to a MTS package.

Inside the package, you do a database query that creates a huge cartesian product. It is best to do this either against a huge database that nobody else is using or you could get away with a smaller database if it is running on some pitiful old machine... Maybe a 233MHz PII with 64MB of
RAM.

Anyway, the point of the query is not to actually return any data, you want it to hang up.

The trick is you bump your transaction timeout up to 5 minutes on the package.

After it times out and control returns to your ASP page, the page does a Response.Redirect to itself forcing the browser to reload and try again.
 
Aren't there some Trojan's or spyware that will do that for you also?
 
The only reason I need this is because when I have a page that pulls information from the database, if you leave the page then go back to it with back button, it says the page needs to be refreshed.

Any other ideas about how to get round this appreciated...

James
 

I'm not sure that refreshing the page with meta tags or JavaScript will repost the form information (which is really what you're after, I believe).

Then again, I've not tested it, so could be wrong.

Dan


The answers you get are only as good as the information you give!

 
Yeah, that won't work. The page showing the "you need to refresh" message won't have your Meta tag or JavaScript in it.

If your query data is small enough in size, you could use the "GET" method instead of "POST" to avoid this problem.

Adam

Pedro offers you his protection
 
I changed it to GET but the result is the same.

The page still needs to be refreshed.

Any other ideas anyone?

 
You will only get the "refresh" message if you POST your form. Are you sure you changed the right form? Do you have a link you can post?

Adam

Pedro offers you his protection
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top