473,769 Members | 3,840 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 4461
marik wrote on 11 sep 2006 in comp.lang.javas cript:
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.javas cript:
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.tech nion.ac.ilwrote in message
news:11******** **************@ i3g2000cwc.goog legroups.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.getEle mentById("opt") .value;
if (sec != "") show();
}
function show() {
window.open(url ,"win","");
setTimeout("sho w()",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.ht m" is running.
Sep 11 '06 #4

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

Similar topics

0
3344
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 than once. What is wrong ? How can I "flush" data in the A2K tables? Thanks for helping,
2
1942
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. Is it possible to read each of these dynamically in python ?? If so, how should my code look like ?? If it was not dynamically required, then, I would change the name of the file in my *open* statement every time and read the corresponding one. But...
0
3338
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 like to be able to:
2
12331
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 sysdate next sysdate+1/24
7
40206
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 so. It should be possible, Right? I don't know much about JavaScript. Thanks for the help.
43
16087
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 someone clicks in a <textarea> to enter their input; otherwise the refresh catches them in the middle and messes up the focus. I need a way to turn off the meta-refresh, or to force the cursor/focus to stay in the message input box once they...
1
10858
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
3178
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 information about it. David
12
6044
by: martin1 | last post by:
All, is there window form refresh property? I try to set up window form refresh per minute. Thanks
0
9422
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10206
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8863
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7403
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6662
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5293
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3949
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3556
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2811
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.