Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > dynamically changing the refresh interval

Reply
Thread Tools

dynamically changing the refresh interval

 
 
marik
Guest
Posts: n/a
 
      09-11-2006
Hi, people.

I have a question:

Can somebody link me to a simple javascript piece of code, that allows
me to get input from a combo box and set the refresh interval of the
page to be that number?

Thank you,
marik

 
Reply With Quote
 
 
 
 
Evertjan.
Guest
Posts: n/a
 
      09-11-2006
marik wrote on 11 sep 2006 in comp.lang.javascript:
> Can somebody link me to a simple javascript piece of code, that allows
> me to get input from a combo box and set the refresh interval of the
> page to be that number?


No, because it is not simple,
as you also have to send the value to the refreshed page.

And why link?
It can be written perfectly on "demand".

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
 
Reply With Quote
 
 
 
 
marik
Guest
Posts: n/a
 
      09-11-2006
So can you please show me how can it be done ( lets say I have page
A.html in which the combo box is, and I have page B.html that I want to
refresh every interval, that I put through the combo box)?


Evertjan. wrote:
> marik wrote on 11 sep 2006 in comp.lang.javascript:
> > Can somebody link me to a simple javascript piece of code, that allows
> > me to get input from a combo box and set the refresh interval of the
> > page to be that number?

>
> No, because it is not simple,
> as you also have to send the value to the refreshed page.
>
> And why link?
> It can be written perfectly on "demand".
>
> --
> Evertjan.
> The Netherlands.
> (Please change the x'es to dots in my emailaddress)


 
Reply With Quote
 
McKirahan
Guest
Posts: n/a
 
      09-11-2006
"marik" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) ups.com...
> So can you please show me how can it be done ( lets say I have page
> A.html in which the combo box is, and I have page B.html that I want to
> refresh every interval, that I put through the combo box)?


Will this work for you? Watch for word-wrap.

<html>
<head>
<title>refresh.htm</title>
<script type="text/javascript">
var sec;
var url = "http://www.google.com/index.html";
function pick() {
sec = document.getElementById("opt").value;
if (sec != "") show();
}
function show() {
window.open(url,"win","");
setTimeout("show()",sec*1000);
}
</script>
</head>
<body>
<form>
<b>Refresh Google every:</b>
<br>
<select id="opt" onchange="pick()">
<option value="">
<option value="5">5 seconds
<option value="30">30 seconds
<option value="60">60 seconds
</select>
</form>
</body>
</html>

This will work as long as "refresh.htm" is running.


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
SDram refresh interval KnowNothing Hardware 0 08-10-2008 06:17 AM
SDram refresh interval KnowNothing VHDL 0 08-05-2008 08:29 AM
Newbie question; refresh with interval DJ Craig Javascript 1 04-23-2005 08:37 AM
JSP: Session parameters vanish on refresh. How do I keep them on refresh? Per Magnus L?vold Java 1 10-08-2004 02:52 PM
Problem with refresh button breaking automatic refresh brian lanning ASP .Net 0 07-29-2003 07:57 PM



Advertisments