What I Am Trying To Do Is Include An Option Box That Has A Refresh Time On The Parent Window. The User Selects The Refresh Time From A Drop Down Option Box & The iFrame Window Refreshes Every X Seconds Based On What The User Has Selected. Note I Can Only Modify The Parent Window, The Data In The iFrame Is Polled On Another Server. Every Time A New Pager Message Is Received.
function reloadIt()
{
frm=document.getElementsByName("pagers")[0];//we get the iframe object
frm.src=frm.src;//or you can set the src to a new src.
setTimeout("reloadIt()",60000);//the function will run every 60000 miliseconds, or 60 seconds
}
ok sorry, it should be included in <script></script> tags, like this
HTML Code:
<script languaje="javascript">
function reloadIt()
{
frm=document.getElementsByName("pagers")[0];//we get the iframe object
frm.src=frm.src;//or you can set the src to a new src.
setTimeout("reloadIt()",60000);//the function will run every 60000 miliseconds, or 60 seconds
}
</script>
and then you call the function "reloadIt()" in the body tag like this:
Can You Please Check My Script, I Have Re-Uploaded The Webpage.
I Sat There Watching It For 4 Minutes. I Set The Timer For 2 Minutes To Auto Refresh the iFrame, However It Had Not Refreshed After 4 Minutes. Right Clicked In iFrame & Pressed Refresh & The Page Had Been Updated.
It Would Appear That The Script Is Still Not Refreshing The iFrame.
I would like something like this to work, if possible, reposting the information on a form.
For instance, say the iframe I'm using has a form. Can it automaticly resubmit the information over a standard time period?
Originally Posted by saulss
ok sorry, it should be included in <script></script> tags, like this
HTML Code:
<script languaje="javascript">
function reloadIt()
{
frm=document.getElementsByName("pagers")[0];//we get the iframe object
frm.src=frm.src;//or you can set the src to a new src.
setTimeout("reloadIt()",60000);//the function will run every 60000 miliseconds, or 60 seconds
}
</script>
and then you call the function "reloadIt()" in the body tag like this:
hehe, it is because you put it all in one line, it would normally work, but since there are comments this is what is happening
Code:
function showAlerts()
{
alert("alert one")
//alert("alert two")
}
in that case, the only thing working is alert one, alert two and that entire row are being commented out, so you will only get one alert
try to separate them into multiple lines OR remove the coments ive put on it
lemme know if it worked
Great Thank You So Much For Your Help I Have Asked A Couple Of Places & No One Has Been Able to Help. I Now Have It Working Very Well At A 2 Minute Refresh.
Also On The Other Issue When It Was All One Line, That Was Weird. Its Spaced Out Nice In The Forums With The Enters In The Right Place, However When I Copied It To Notepad It Put It On One Line & I Did Not Notice.
i was passing thru your discussions on auto refresh problem. i need a
help on html auto refresh feature. my main page has a auto refresh with java
scripts. When i invoke a different html window from my main window when autorefresh is happening the second window looses focus and goes behind my main page. how to over come this problem. I would like my main page to keep refreshing at the background with out disturbing other pages.
thanks & regards
Selva
Bookmarks