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

Disabling Page Refresh

I have a META tag coded as follows:

<META HTTP-EQUIV="refresh"
CONTENT="60;URL=http://www.mydomain.com/myPage.html" id="refreshMeta">

This of course causes the page to automatically refresh itself every 60
seconds.

Now I want to have a button on my page that allows the user to stop the page
from reloading itself so I created the following function:

function disableRefresh()
{
document.getElementById("refreshMeta").httpEquiv = 0;
}

This all works fine when run locally on my machine, but it does not work
when run served by a remote server and I don't know why.

I'm running Windows 2000, Internet Explorer 6.0, and WebLogic 7.0 on the
remote server.
Jul 23 '05 #1
1 1603
Ivo
"Tom Frantz" wrote
I have a META tag coded as follows:

<META HTTP-EQUIV="refresh"
CONTENT="60;URL=http://www.mydomain.com/myPage.html" id="refreshMeta">

This of course causes the page to automatically refresh itself every 60
seconds.

Now I want to have a button on my page that allows the user to stop the page from reloading itself so I created the following function:

function disableRefresh()
{
document.getElementById("refreshMeta").httpEquiv = 0;
}

This all works fine when run locally on my machine, but it does not work
when run served by a remote server and I don't know why.


I am not sure meta tags can take id's officially. But this idea might work:
<script>
var node = document.getElementsByTagName('meta')[x];
node.parentNode.removeChild(node);
</script>
where x is the zero-based index of the meta tag in question. So if it is the
second, x would be 1.
There are other ways, including refreshing the page using a script rather
than a meta tag and controlling whether this script runs or not with a
variable.
HTH
Ivo
Jul 23 '05 #2

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

Similar topics

3
by: Scott | last post by:
I have a clickable graph that resides on page 1. If user clicks a data point on the graph, the page runs again yeilding a 2nd graph that shows a more detailed graph. Problem is, I have a...
2
by: HKM | last post by:
Hi All, Is it possible to disable the datagrid refresh while changing the datasource properties, basically im renaming columns in the background and sometime it gets crazy to see datagrid...
9
by: PK9 | last post by:
I'm having an issue with the "Refresh" of an asp.net page. The refresh is actually calling my last onClick event. I thought that asp.net was supposed to be stateless in that it shouldn't...
12
by: Nalaka | last post by:
Hi, I suddenly started getting a lot of errors from html validation (some CSS) so I followed the following instructions to disable it. If you'd rather not have these types of HTML validation...
2
by: Kapil Jain | last post by:
Dear All, I would like to disable back and forward button + Refresh button. Please help in doing this. I want this because i am displaying data from mysql database and on back and forward button...
11
by: EagleRed | last post by:
I am writing an ASP.NET 2.0 application that uses master pages. I have some pages that must not be cached on the client. In ASP.NET 1.1 I achieved this using metatags: <meta...
2
by: Chamomile | last post by:
Does anyone know a way to disable the 'refresh alert' windown that pops up in ie when document.location.reload() is used on a page that has post data? In thecontext I'm using reload() this...
16
by: David Cox | last post by:
I click on "view source" on this site and nothing seems to happen. http://www.gm.tv/index.cfm?articleid=24657 Anybody know how it is done? I was trying to get a link to the Nuala clip...
20
by: Geoff Cox | last post by:
Hello, I am not at clear how to tackle this one. Say the note middle C is played, just once. Then when the user clicks on a play image a series of notes are played starting with middle C...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
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...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
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...

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.