|
|
|
|
![]() ![]() |
Apr 20 2005, 11:19 PM
Post
#1
|
|
|
Super Member ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 407 Joined: 13-December 04 Member No.: 2,696 |
Well this questioned wasnt answered in 2003 but hopefully somebody knows the answer, sorry if this is a simple question but can i force the web browser to refresh the page after pressing the submit button. Basically my cgi perl form copies a different jpeg with teh same name into my public_html folder every time the form is submitted, therefore i have to click on the refresh button in IE to see the different picture. I have tried
Code: <meta http-equiv="no-cache" but it doesnt seem to work in IE6 |
|
|
|
May 1 2005, 12:53 PM
Post
#2
|
|
|
Incest is a game the whole family can play. ![]() Group: [MODERATOR] Posts: 1,223 Joined: 11-February 05 From: Heaven Member No.: 3,709 |
You want a refresh button on your page?
That how I understand it, here's the code: <form action="index.cgi"> <input type="submit" value="Change Image"> </form> index.cgi is your page you want to refesh to. The button will take you to index.cgi creating a refresh effect thus causing the image to change. So simple. Is that what you wanted? |
|
|
|
May 4 2005, 02:38 AM
Post
#3
|
|
|
Member [Level 2] ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 76 Joined: 2-March 05 From: USA Member No.: 4,110 |
I haven't tested this, but you could try a little javascript in an "onclick" event on your submit button, like so:
CODE <input type="submit" value="Change Image" onclick="history.go(0)" /> "history.go(0)" takes you to the current page in IE's history, in other words, it refreshes the page. You can make an image change its source automatically (without a page refresh) with javascript. If that is something you think would work for you, just say so and I'll post an example. |
|
|
|
Mar 10 2006, 06:39 AM
Post
#4
|
|
|
Newbie ![]() Group: Members Posts: 1 Joined: 10-March 06 Member No.: 19,800 |
I haven't tested this, but you could try a little javascript in an "onclick" event on your submit button, like so: CODE <input type="submit" value="Change Image" onclick="history.go(0)" /> "history.go(0)" takes you to the current page in IE's history, in other words, it refreshes the page. You can make an image change its source automatically (without a page refresh) with javascript. If that is something you think would work for you, just say so and I'll post an example. Sorry, it refreshes only the active frame |
|
|
|
Mar 10 2006, 04:32 PM
Post
#5
|
|
|
Trap Grand Marshal Member ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 1,203 Joined: 25-March 05 Member No.: 4,883 |
Try this..
CODE <html> <head> <script language="javascript"> function refreshpage() { window.location.reload(); } </script> </head> <body> <form action="" method="" name="" onsubmit="refreshpage();"> <input name="submit" type="submit" value="submit"> </form> </body> </html> |
|
|
|
Mar 10 2006, 04:52 PM
Post
#6
|
|
|
Desperately seeking "any key" to continue... ![]() Group: Admin Posts: 3,497 Joined: 23-April 05 From: Trap17 storage box Member No.: 6,042 |
I am understanding the question as:
after submit ==> see new page (with different jpg) is this right? If so, you can do HTML <form method="POST" action="run your script to submit" name="myform" > <input type="hidden" name="name of another function that redirects" value="the secondary file"> And on "the secondary file" you can do HTML <meta http-equiv="refresh" content="1"> This will refresh the secondary file's instruction in 1 second. This is useful if you enabled cookies and it needs to be forced refresh. You can adjust the seconds or not include it at all. |
|
|
|
Jun 4 2008, 06:25 AM
Post
#7
|
|
|
Hail Caesar! ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 5,876 Joined: 21-September 07 Member No.: 50,369 |
Javascript code for Page Refresh
Refresh Web Page The code does work wonderfully. Though I am a novice, I could add the code to my Web Page: Http://www.Irtsa.Net/dlqb-01.Htm And it worked wonderfully well. Thanks and keep it up! -reply by Navtej Singh |
|
|
|
![]() ![]() |
Similar Topics
| Topics | Topics | |
|---|---|---|
|
|
|
|
Lo-Fi Version | Time is now: 13th October 2008 - 10:35 PM |