kvarnerexpress 0 Report post Posted April 20, 2005 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 Share this post Link to post Share on other sites
electriic ink 1 Report post Posted May 1, 2005 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? Share this post Link to post Share on other sites
spacemonkey 0 Report post Posted May 4, 2005 I haven't tested this, but you could try a little javascript in an "onclick" event on your submit button, like so: <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. Share this post Link to post Share on other sites
palincs 0 Report post Posted March 10, 2006 I haven't tested this, but you could try a little javascript in an "onclick" event on your submit button, like so: <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 Share this post Link to post Share on other sites
Inspiron 0 Report post Posted March 10, 2006 Try this.. <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> Share this post Link to post Share on other sites
BuffaloHelp 24 Report post Posted March 10, 2006 I am understanding the question as:after submit ==> see new page (with different jpg)is this right?If so, you can do <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 <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. Share this post Link to post Share on other sites
iGuest 3 Report post Posted June 4, 2008 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://forums.xisto.com/no_longer_exists/ And it worked wonderfully well. Thanks and keep it up! -reply by Navtej Singh Share this post Link to post Share on other sites
iGuest 3 Report post Posted December 24, 2008 Page Reload when Page Time IdealRefresh Web PageI have one page which is built with javascript and php.If I access that page at that time automaticaly refresh or reload event apply but I want when on this page any event is fire like mouse move,mouse click or key press at that time not refresh automatically but when it's ideal time limit is over then start refresh automatically. Is it Possible so please suggest me ...????? -question by gautam Share this post Link to post Share on other sites