473,387 Members | 1,541 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

dynamically changing the refresh interval

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

Sep 11 '06 #1
3 4441
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)
Sep 11 '06 #2
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)
Sep 11 '06 #3
"marik" <sm****@t2.technion.ac.ilwrote in message
news:11**********************@i3g2000cwc.googlegro 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.
Sep 11 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Bernard André | last post by:
Hi All, I am getting crazy.... This code work fine in step by step but at execution time, it looks like a delay to refresh the A2K table from VB is resulting in some records being treated more...
2
by: Satish Kumar Chimakurthi | last post by:
Hi all, An external solver program is dynamically producing files with different names 0000001.dat, 0000002.dat, 0000003.dat etc.....at regular intervals. These files contain all numeric data....
0
by: Conax | last post by:
Hi, It's me again asking about IFRAME. With UncleWobby, Steven Burn and Roland Hall's help, I was able to create a proper IFRAME section on my page. Now I come to the next problem. I'd...
2
by: AJ | last post by:
Hi, I have a materialized view in oracle which is a complex view of 4 tables which belongs to different schemas.. create materialized view materialized_sum refresh complete start with...
7
by: Willem | last post by:
Can someone tell me how I can get a page(any page) on the Internet to refresh automatically every 5 minutes. I was thinking along the lines of having a HTML file on my C-drive with JavaScript to do...
43
by: dan baker | last post by:
I have a page that gets loaded with a meta-refresh hardcoded so that a few things on the page get updated. its kind of a fake chat board. anyway, what I need to do is turn off the meta-refresh once...
1
by: Marco Maroni | last post by:
How to force image refresh on client browser ? Is ti possible to force the refresh of the same image (tha was changed server-side) to the client, without user press Contrl+F5 in IE ? - Marco
3
by: david | last post by:
I do not have the experience with it. For example, update the data in the ASP form every minute by retrieving data from database. Or do you have other methods? Thank you for any advice and...
12
by: martin1 | last post by:
All, is there window form refresh property? I try to set up window form refresh per minute. Thanks
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.