473,385 Members | 1,748 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,385 software developers and data experts.

dynamic reload delay with http-equiv and javascript?

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(delay){
reloader.content=delay;
}
</SCRIPT>

And the select box looks like this:

<SELECT onchange="setReloader(this.options[this.selectedIndex].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

Jul 20 '05 #1
1 5258
"steve stevo" <st***@stevosteve.fsnet.co.uk> writes:

Please don't top post.
function setReloader(delay){

setTimeout(window.location.href=http://www.yahoo.com,delay*1000);

}


You need som quotes for this to work:
setTimeout("window.location.href='http://www.yahoo.com'",delay*1000);

/L
--
Lasse Reichstein Nielsen - lr*@hotpop.com
Art D'HTML: <URL:http://www.infimum.dk/HTML/randomArtSplit.html>
'Faith without judgement merely degrades the spirit divine.'
Jul 20 '05 #2

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

Similar topics

1
by: Marshall Dudley | last post by:
I need to be able to allow a user to submit a form which opens another window. This part I have working. But after the submit, I need to delay and have the original window do a reload. I cannot...
2
by: Dave Williamson | last post by:
When a ASPX page is created with dynamic controls based on what the user is doing the programmer must recreate the dynamic controls again on PostBack in the Page_Load so that it's events are wired...
4
by: John | last post by:
Hi all, I have posted this type of question quite a few times but to date, no-one has actually been able to provide me with a solution. I really need to understand how to do this properly. My...
7
by: John | last post by:
Hi all, I need finality on this once and for all please. I have a main page which contains a couple of placeholders and within these placeholders, depending on what the user presses, I load...
8
by: Sandy Pittendrigh | last post by:
I have a how-to-do-it manual like site, related to fishing. I want to add a new interactive question/comment feature to each instructional page on the site. I want (registered) users to be able...
1
by: Gummy | last post by:
Hello, I am loading several user controls dynamically in OnInit() like this: ucListBoxSelections ucLocation = (ucListBoxSelections)LoadControl("UserControls/ucListBoxSelections.ascx");
7
by: Christopher Pisz | last post by:
My problem is my derived class is getting called twice instead of the base and then the derived. I thought this was the purpose for virtuals and dynamic casting :/ I want my base class to have its...
7
by: amishguy | last post by:
Hello, I am having an issue with a site I'm creating right now. I have had this issue before and I would like to figure out what the solution is instead of using workarounds as I have in the...
6
by: AGP | last post by:
VB.NET 2005 I've been working extensively with saving and loading my settings via the My.Settings class. its worked out great except that i cant figure out how to set a default setting that is...
3
balabaster
by: balabaster | last post by:
I've got a user control that builds a table of dynamic data based on a :LINQ class holding the data. The data is loaded using the LoadData(DataInstance) method. The table it builds contains a...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
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:
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
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.