473,326 Members | 2,127 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,326 software developers and data experts.

back() and reload() at the same time?

Hi!

By pressing a button I am directed from one page to another. At the second
page some things displayed on the first page are changed and now I want to
go back to the first page again. The pages are written in php.

If I use javascript:history.back() I get back to the first page but I have
to manually reload it to see the changes I have made.

The solution could be:
echo "<meta http-equiv=\"refresh\"
content=\"0;url=firstpage.php?op=view&id=$id&...&. ..&....\">";
But I have to do a lot of work to get all the options (e.g. op=view&...).

Is there anyway I can use javascript to go back to the first page and force
it to reload, so that I don't have to reload it my self?

Or is there some way I can read out what is in javascript:history.back() so
that I could place it in the above mentioned solution? It doesn't seem to
work if I just do the following:
echo "<meta http-equiv=\"refresh\"
content=\"0;url=javascript:history.back()\">";

Sincerely
Kim Therkelsen, Denmark
Jul 20 '05 #1
2 17994

"Kim Therkelsen" <kt****@control.auc.dk> schreef in bericht
news:bk**********@sunsite.dk...

By pressing a button I am directed from one page to another. At the second
page some things displayed on the first page are changed and now I want to
go back to the first page again. The pages are written in php.

If I use javascript:history.back() I get back to the first page but I have
to manually reload it to see the changes I have made.
....
Is there anyway I can use javascript to go back to the first page and force it to reload, so that I don't have to reload it my self?


Instead of using JavaScript, you could use a meta cache control header at
the top of firstpage.php.

You could also start firstpage.php with a parameter check, e.g. when the
parameter doesn't exist, throw in a 302 header to append this parameter:

<?
if (!isset($_GET['rnd'])) {
header("Location: {$_SERVER['PHP_SELF']}?rnd=".time());
exit;
}
?>
JW

Jul 20 '05 #2
maybe you could use
"window.navigate(someURL)"
on the second page to navigate "back" to the first page?
"Kim Therkelsen" <kt****@control.auc.dk> wrote in message
news:bk**********@sunsite.dk...
Hi!

By pressing a button I am directed from one page to another. At the second
page some things displayed on the first page are changed and now I want to
go back to the first page again. The pages are written in php.

If I use javascript:history.back() I get back to the first page but I have
to manually reload it to see the changes I have made.

The solution could be:
echo "<meta http-equiv=\"refresh\"
content=\"0;url=firstpage.php?op=view&id=$id&...&. ..&....\">";
But I have to do a lot of work to get all the options (e.g. op=view&...).

Is there anyway I can use javascript to go back to the first page and force it to reload, so that I don't have to reload it my self?

Or is there some way I can read out what is in javascript:history.back() so that I could place it in the above mentioned solution? It doesn't seem to
work if I just do the following:
echo "<meta http-equiv=\"refresh\"
content=\"0;url=javascript:history.back()\">";

Sincerely
Kim Therkelsen, Denmark

Jul 20 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

21
by: Tony Marston | last post by:
If the use of the browser's BACK button is interfering with the operation of your web application then take a look at this article entitle "Back Button Blues" ...
66
by: Ellinghaus, Lance | last post by:
> > Other surprises: Deprecating reload() >Reload doesn't work the way most people think >it does: if you've got any references to the old module, >they stay around. They aren't replaced. ...
4
by: David MacQuigg | last post by:
I'm going to be teaching EEs some basic Python using the first few chapters of Learning Python, 2nd ed. by Mark Lutz. The discussion on Reloading Modules starting on page 266 is confusing and I...
3
by: kai | last post by:
Hi, I use Access 2003, I put "Me.Requery" in code under a button click to reload the form. I always in the first record after reload, which is normal. But I want to go back the initial record...
3
by: =?ISO-8859-1?Q?Gregory_Pi=F1ero?= | last post by:
Hi Python Experts, I hope I can explain this right. I'll try. Background: I have a module that I leave running in a server role. It has a module which has data in it that can change. So...
1
by: Rob | last post by:
I know this is an old one, considering how many posts I found on it but I just wondered if any best practises had popped up recently, especially as Ajax has increased JavaScript and DHTML's...
12
by: jim.richardson | last post by:
Hi all, I'd like a page to be excluded from the back button history, that is, when a user hits their browser's back button, it never backs into this particular page. Can anybody please tell...
8
by: Harvey Schmidlapp | last post by:
I have a fairly complex form (generated by means of an ASP 3 page). The form is used to define a query against a database. After running a query, the user hits their browser's back button and goes...
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
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...
1
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: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
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...

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.