Log in

View Full Version : Refresh a HTML page from another page



jay66online
01-20-2009, 05:34 AM
Hi,

I am new to HTML coding and am not aware of all the options that are available with HTML, my requirement is as below

I have a page 1.html on the server to which i don't have the edit access, I have some data which I check on this page at regular intervals of 10 seconds......:mad:

Now my problem lies here since this page is not editable i cannot change the refresh settings for 1.HTML

My query : Is there an option available wherein I create my own page 2.HTML on my local desktop and write a code in 2.html such that page 1.HTML is refreshed every 10 seconds and obviously 2.html being open all the while..:confused:

Any kind of suggestions will be appreciated....:)

Thanks,
Jay

Dirt_Diver
01-20-2009, 06:20 AM
There are a couple of ways you could refresh a page.

If you want to use PHP you could do this.

<?php
header("Refresh: 120;");
?>

If you wanted to use javascript in an html document you could do this,


<script type="text/javascript">
function reFresh() {
location.reload(true)
}
/* Set the number below to the amount of delay, in milliseconds,
you want between page reloads: 1 minute = 60000 milliseconds. */
window.setInterval("reFresh()",300000);
</script>

You could even use a META tag to refresh a page.

<META HTTP-EQUIV="REFRESH" CONTENT="10">

jay66online
01-20-2009, 06:25 AM
Hi, thanks a lot for the prompt answer but actully this was not my requirement..

I need to refresh another open page 1.html whose source code is not editable with a code 2.html that is my page.

Please see my earlier post i have defined it clearly..

Thanks,
Jay

Dirt_Diver
01-20-2009, 11:03 PM
okay I understand what you want now but I don't see how you want to set it up. You could use iframes and just have the interior page load every 10 seconds but why would you want to reload every 10 seconds?

Also it depends on what your overall goal is.

jay66online
01-21-2009, 04:50 AM
Okie..let me explain..


The page which is on the server is a page from my client which performs some operations after we initiate an operation..each process i initiate has lots of sub processes which go on automatically and the status of each process ..which are ..=success,waiting,error" are shown up on the screen....and each main process takes around an hour or so to complete and if any of the subprocess fails immediately the main process too fails..

i hope u understood what i meant to say from above...since i dnt have a specific time for the completion of the main process..i need to continously press F5 to refresh the page and check if there is a error...so i thought why not create another local page..which could refresh the main page...

this is the complete story..:)

jay66online
01-21-2009, 04:52 AM
Also..let me know if use of iframes can solve this problem...if so can you please give a small example as to how i could set it up ...as i said i am just a newbie to HTML and all web related coding