473,406 Members | 2,352 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,406 software developers and data experts.

META HTTP-EQUIV="Refresh"


Is there a way to replace the URL value below, on the fly?

<META HTTP-EQUIV="Refresh"
CONTENT="3;URL=http://www.some.org/some.html">

Jul 23 '05 #1
4 3667
Marcia Gulesian wrote on 30 jun 2004 in comp.lang.javascript:
Is there a way to replace the URL value below, on the fly?

<META HTTP-EQUIV="Refresh"
CONTENT="3;URL=http://www.some.org/some.html">


What do you mean with "on the fly"?

And all this inside 3 seconds?

===================================

If you want to do it programmatically with clientside javascript, you
better use javascript all along:

<script type='text/javascript'>

myNewLocation = 'http://www.some.org/some.html'

setTimeout("location.href = myNewLocation",3000)

<script>
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Jul 23 '05 #2
>> What do you mean with "on the fly"?

Programatically.

"Evertjan." wrote:
Marcia Gulesian wrote on 30 jun 2004 in comp.lang.javascript:
Is there a way to replace the URL value below, on the fly?

<META HTTP-EQUIV="Refresh"
CONTENT="3;URL=http://www.some.org/some.html">


What do you mean with "on the fly"?

And all this inside 3 seconds?

===================================

If you want to do it programmatically with clientside javascript, you
better use javascript all along:

<script type='text/javascript'>

myNewLocation = 'http://www.some.org/some.html'

setTimeout("location.href = myNewLocation",3000)

<script>

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)


Jul 23 '05 #3
Marcia Gulesian wrote on 30 jun 2004 in comp.lang.javascript:
"Evertjan." wrote:
Marcia Gulesian wrote on 30 jun 2004 in comp.lang.javascript:
> Is there a way to replace the URL value below, on the fly?
>
> <META HTTP-EQUIV="Refresh"
> CONTENT="3;URL=http://www.some.org/some.html">
What do you mean with "on the fly"? Programatically.

And all this inside 3 seconds?

===================================

If you want to do it programmatically with clientside javascript, you
better use javascript all along:

<script type='text/javascript'>

myNewLocation = 'http://www.some.org/some.html'

setTimeout("location.href = myNewLocation",3000)

<script>


So what do you think of the above, Marcia?

Or do you want the user to press a button to change the destination
inside those 3 seconds?

Or depending on the time of day?

<script type='text/javascript'>

t = new Date()

myNewLocation = (t.hours()<12)
? 'http://www.some.org/morning.html'
: 'http://www.some.org/afternoon.html'

setTimeout("location.href = myNewLocation",3000)

<script>

But then why the 3 seconds waiting?

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Jul 23 '05 #4
Evertjan. wrote:
Marcia Gulesian wrote on 30 jun 2004 in comp.lang.javascript:

"Evertjan." wrote:

Marcia Gulesian wrote on 30 jun 2004 in comp.lang.javascript:

Is there a way to replace the URL value below, on the fly?

<META HTTP-EQUIV="Refresh"
CONTENT="3;URL=http://www.some.org/some.html">

What do you mean with "on the fly"?
Programatically.
And all this inside 3 seconds?

===================================

If you want to do it programmatically with clientside javascript, you
better use javascript all along:

<script type='text/javascript'>

myNewLocation = 'http://www.some.org/some.html'

setTimeout("location.href = myNewLocation",3000)

<script>

So what do you think of the above, Marcia?

Or do you want the user to press a button to change the destination
inside those 3 seconds?

Or depending on the time of day?

<script type='text/javascript'>

t = new Date()

myNewLocation = (t.hours()<12)


// t.getHours() perhaps?
Mick
? 'http://www.some.org/morning.html'
: 'http://www.some.org/afternoon.html'

setTimeout("location.href = myNewLocation",3000)

<script>

But then why the 3 seconds waiting?

Jul 23 '05 #5

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

Similar topics

24
by: AES/newspost | last post by:
On many web sites or pages (including my own home page) clicking on certain links will start downloading a PDF file, sometimes without the author having provided any warning in the text of the page...
2
by: Bill Cohagan | last post by:
I'm trying out ASP.Net and am currently trying to figure out how to refresh the contents of one frame based on a button click in another frame. The button in question is actually a server side...
6
by: Pealy | last post by:
Hi. I'm trying to get one of the examples from ASP.NET 1.1 Insider Solutions to work in asp.net and i'm getting stuck on using the META tage to do a refresh. I have the following in my HTML...
1
by: David | last post by:
how can I force the "document.execCommand("Refresh");" command to refresh page only one time?
2
by: ujjc001 | last post by:
For some reason I can't Response.AppendHeader("Refresh", Convert.ToString((Session.Timeout * 60) + 60) & "; URL=default.aspx") to add the tag into the header. In the source the refresh header is...
1
by: IkBenHet | last post by:
Hello, Currently I am using a large input form on a website that is based on ASP and JavaScript. Depending on the values that are filled in by the user the forms does a refresh and makes...
4
by: simon | last post by:
hello, i have a section of a page that has multiple dropdowns. each dropdown calls the same method on a change of selection by the user. the method loops over all the dropdowns and if the newly...
5
by: Jeremy | last post by:
Hi all, I have database actions that will potentially take several seconds to complete. My normal page uses AJAX so keeping the user informed of what is happening is not a problem. ...
4
by: Simon | last post by:
Dear reader, If I change the content of a field in an event procedure and in the same procedure I do a refresh, the refresh has no effect. The code in the event is as follows:
5
by: tabariz | last post by:
Hello everybody can anyone tell me whats the correct syntax to add a variable previously declared to the url in the command header("refresh: 5, url:) for example i want my URL to be ...
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
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
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,...

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.