Hello-
I have a need to allow a user to reload a page on a chosen interval
(selected from a select box) or to chose not to reload the page at all
(default).
I would like to do this in javascript.
Currently I am using the meta tag as default, no refresh:
<META http-equiv="refresh" content="" url="" id="reloader">
Then I want the user to be able to dynamically select that using a select
box and javascript. The javascript looks like this:
<SCRIPT>
function setReloader(del ay){
reloader.conten t=delay;
}
</SCRIPT>
And the select box looks like this:
<SELECT onchange="setRe loader(this.opt ions[this.selectedIn dex].value)">
<OPTION value="">No refresh</OPTION>
<OPTION value="10">10 Seconds</OPTION>
<OPTION value="30">30 Seconds</OPTION>
</SELECT>
I can verify (using alert boxes) that the select works and sends the proper
value to the javascript function. However the JS function doesn't seem to
be able to modify the meta tag. Is this concept even possible? If not then
what are some alternative choices?
thanks.
troy
I have a need to allow a user to reload a page on a chosen interval
(selected from a select box) or to chose not to reload the page at all
(default).
I would like to do this in javascript.
Currently I am using the meta tag as default, no refresh:
<META http-equiv="refresh" content="" url="" id="reloader">
Then I want the user to be able to dynamically select that using a select
box and javascript. The javascript looks like this:
<SCRIPT>
function setReloader(del ay){
reloader.conten t=delay;
}
</SCRIPT>
And the select box looks like this:
<SELECT onchange="setRe loader(this.opt ions[this.selectedIn dex].value)">
<OPTION value="">No refresh</OPTION>
<OPTION value="10">10 Seconds</OPTION>
<OPTION value="30">30 Seconds</OPTION>
</SELECT>
I can verify (using alert boxes) that the select works and sends the proper
value to the javascript function. However the JS function doesn't seem to
be able to modify the meta tag. Is this concept even possible? If not then
what are some alternative choices?
thanks.
troy
Comment