Jump to content
xisto Community
Sign in to follow this  
kvarnerexpress

Refresh Web Page

Recommended Posts

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

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

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

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

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

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
Page Reload when Page Time IdealRefresh Web Page

I 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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.