473,322 Members | 1,403 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

Refresh a page twice

Hi all,

How can I refresh a page twice?
Mar 6 '07 #1
4 8046
acoder
16,027 Expert Mod 8TB
Why would you want to do that? What are trying to achieve? I'm sure there is a better way. But if you must, pass a value in the url, e.g.
Expand|Select|Wrap|Line Numbers
  1. http://www.yoursite.com/url.php?times=once
. Then use Javascript in the onload event handler to check this query string. If it's set, then reload the page again using:
Expand|Select|Wrap|Line Numbers
  1. location.href='http://www.yoursite.com/url.php?times=twice'
Now when you check in the onload function, it's not set to 'once' so the page is not reloaded.

I still think you shouldn't be doing this, but anyway... there you have it.
Mar 6 '07 #2
Why would you want to do that? What are trying to achieve? I'm sure there is a better way. But if you must, pass a value in the url, e.g.
Expand|Select|Wrap|Line Numbers
  1. http://www.yoursite.com/url.php?times=once
. Then use Javascript in the onload event handler to check this query string. If it's set, then reload the page again using:
Expand|Select|Wrap|Line Numbers
  1. location.href='http://www.yoursite.com/url.php?times=twice'
Now when you check in the onload function, it's not set to 'once' so the page is not reloaded.

I still think you shouldn't be doing this, but anyway... there you have it.

>>>I want to refresh the page by clicking a link. and I want to refresh it twice..
;-)
Mar 6 '07 #3
dmjpro
2,476 2GB
why do u want to refresh it twice ......
Mar 6 '07 #4
acoder
16,027 Expert Mod 8TB
>>>I want to refresh the page by clicking a link. and I want to refresh it twice..
;-)
Again, pass some reference or some indication that you have refreshed the page once or twice, e.g.
[HTML]<a href="yourpage.php?refresh=1">Reload</a>[/HTML] Then when you click the link, it will reload the page you are on. Of course, change "yourpage.php" to the file name. Then use 'refresh' to determine the number of times the page has been refreshed.
Mar 6 '07 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Brad White | last post by:
Overview: I have a custom web app that has an 'Inbox' that refreshes every 30 seconds. One user uses Outlook to host the web page. Using IE, the refresh works fine. If the user is working in...
0
by: michaeltorus | last post by:
I'm working on an .net 1.1 web app that someone else has designed, so I'm trying to figure out if whatt he is saying about some strange behaviour is something he's done wrong, or can be fixed. So,...
9
by: Mr Newbie | last post by:
Before someone flames me, I know this is the VB.NET groups, nonetheless, the asp.net guys seems to have almost disapeared from the aspnet groups so I thought I would ask this here. I have a...
2
by: entfred | last post by:
I was experimenting with trying to select the same item in a select box twice in a row and found out that you need to do a refresh (view - refresh) in Internet Explorer. This is so you can click...
5
by: SimonZ | last post by:
When user insert some data on page and click save button this data is inserted to database. If he clicks refresh button, the data is saved again each time when he clicks this button. I would...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.