Stopping Http Or Meta Refresh

Jan 14, 2009

I have a web page which takes a while to generate due to serverside processing. I currently show a "please wait" page, which includes a meta refresh tag, as well as a refresh http header, to refresh the current page every X seconds to check if thier data is finished processing. They're also provided a manual link to click to refresh the page, just in case thier browser doesn't like automatic redirection.

I think this works great for just about all users. But I have this idea that it would be nice if I used ajax to check back with the server instead of making the browser reload the webpage. I want this to be an enhancement of functionality, so that users without javascript or ajax capability still fallback on the solid current functionality. This means I need a way to stop the browser from obeying the http refresh header and meta tag. Is such a thing possible with javascript?

View 3 Replies


ADVERTISEMENT

Meta Refresh

Jul 23, 2007

I have a requirement to hit a page, run some JavaScript, and move on to another page. It's uncertain whether the user actually has JavaScript enabled, so I can't use JS to effectuate the move to the second page. Here's what I've got:

<html>
<head>
<meta http-equiv='refresh' content=&#390;url=page2.html'>
</head>
<body>
<script src="http://www.example.com/example.js"></script>
<script>
_xxx = "xxxxxxxxx";
xxx();
</script>
</body>
</html>

My question: will the JS run before the refresh to page2.html? I tested this with an alert() in the script and it seemed to work fine. I just thought some of the W3C gurus out here might be able to give more authoritative answers.

View 1 Replies View Related

Call A Function In A Meta Refresh Statement?

Jan 18, 2010

Is there a way to call a javascript function in a meta refresh statement? I'm refreshing my page but if I have data in my fields I don't want to loose them. If I can call using a JS function then in that function I can call the Submit function and save my data in the called script.

My syntax below doesn't fire the JS function:

<meta http-equiv="refresh" content="30;url=javascript:auto_refresh();">

View 1 Replies View Related

META Tags

Jul 23, 2005

I have a web form that needs to be printed for signatures. Problem is the
form is just a bit too big and always prints on two pages. Is there a meta
tag that will tell the printer to print the document on one page...or is
there a meta tag I can use to print at 80%?

View 1 Replies View Related

Add Meta Tag To <head>?

Mar 11, 2009

[URL]

That didnt work The code is added to the oScript element but thats it. I have tried another script from here:

[URL]

I want to add a meta tag from the body tag and it worked using Jscript

This worked only on my local but not on hoster:

HtmlMeta GoogleVerify = new HtmlMeta();
GoogleVerify.Name = "verify-v1";
GoogleVerify.Content = "681rsArfYmoRz88BIT8ZVDeLk4b6VMEn1+StcF61iwY=";
HtmlHead head = (HtmlHead)Page.Header;
head.Controls.Add(GoogleVerify);

And on the hoster theres a scripting error as well why innerHTML doest work?

View 9 Replies View Related

How To Read Meta Tag Value With Js?

Nov 23, 2005

Does anyone know how - or better yet - have a sample of how to extract information from a meta tag in an HTML document's head tag using Javascipt?

I have looked at the DOM with Firefox - but it seems so long. I'd be really interested in a better way. If someone has the javascript for walking through the DOM, that would be cool too. I havn't built it yet.

View 2 Replies View Related

Add Additional Meta Tags Using JS

Jul 20, 2005

I have documents that I want to automatically add additional meta
tags to. The documents already have some meta tags and I want to keep them
all together, so I want to add my new meta tags to the end of the existing
ones... can someone help me out with a script to do this... example below.=

View 1 Replies View Related

Meta Tag For Scripting Language

Jul 20, 2005

I have some doubts about this meta tag:
<META http-equiv="Content-Script-Type" content="text/javascript">

Do I really need to declare this meta tag in all my pages?

If I declare it, will I still need to create my scripts this way?
<script type='text/javascript'>

Is there any advantage/disadvantage when using it?

View 2 Replies View Related

Meta Redirect, New Window?

Feb 17, 2003

is it possible to use the META http-equiv=refresh tag to redirect to another page in a NEW window?

View 2 Replies View Related

How To Turn Off The AutoComplete Using Meta Tags

Jul 23, 2005

I was wondering if there is some other way to turn autocomplete off besides using "autocomplete=off", using a meta tag or something similar. It would be great if there is some way to turn it off at a page level....

View 2 Replies View Related

Update Meta Description With Div Content?

Feb 22, 2010

is there a way to set the meta description to x amount of charictars from the content of a div in the body?

View 2 Replies View Related

Passing Meta-knowledge About A Form Element

Jan 20, 2006

I need to create a table where each element has certain specific properties.

For example, elements in the first column should always have a range of
0-100, and increment by 1. Elements in column 2 might have a range of
0-360, and increment by 0.1. Altogether there might be 8 elements in
each row.

Since this is basically the same javascript function over and over, I
wonder if there is a way to create some <input> element that might
contain this knowledge in a way that javascript can access it.

For example, could I have

<input type="text" class="percent" onkeypress="javascript:blah(event)">

where the javascript function could retrieve the class value?

Since this is going to be fairly complex, I'd like to make it fairly
self-documenting and simple. It's much easier for a maintainer to
understand class="precent" than "javascript:blah(0,100,1,event)",
especially since I am also going to have to pass navigation information
(is this a border element in the table? what are my neighbors? kind
of information... - so that the actual information might end up being
javascript:blah(0,100,1,5,21,16,18,0,1,0,0,event) to denote the data
type, the 4 neighbors, and the 4 border conditions....

View 3 Replies View Related

JQuery :: Selector Incompatibility With Meta Characters?

Dec 22, 2011

I'm working for a company as a consultant and i'm trying to upgrade their jQuery version to the latest available (1.7.1). Previously they were able to do a selection such as $('a[name*=word<>word]') without any problems, however, after upgrading to 1.7.1 the selection is invalid even when escaping both meta characters with a double backslash ( $('a[name*=word\<\>word']) ) - I know the best solution would be to just change the selection based on something else like a class name, but this is something they are using across the whole site and we have a deadline for this.

View 4 Replies View Related

Dynamically Changing Page Title And Meta Description?

Sep 9, 2009

I am using PHP & mySql to grab the title and description that I have stored in a table in the DB.

I am trying to dynamically change the <head> <title></title>, as well as <meta name="Description" content="" /> .

I used document.title to change the title. I see the title changing in the browser, but when I click on view source in the browser to see it int he code, the title is empty. How can I also see it in the code?

How do I change the description in the meta tag?

View 4 Replies View Related

Stopping Ctl-click In IE

Jul 23, 2005

I have a situation where I want to react to a ctrl-click on a <span> and
it works in Netscape and Firefox browsers but in IE I have a problem.
In IE I do catch the ctrl-click but IE also renders the span in inverse
video, essentially selecting the item.

Here is a short sample that demonstrates the issue:

<html><head>
<script type="text/javascript">

function Clicked(evt){
evt.cancelBubble=true;
}

</script></head>
<body>
<SPAN onClick="Clicked(event);">click me</SPAN>
</body></html>

I thought the cancelBubble would prevent the event from triggering the
selection from happening but I think that the ctrl-click selection
happens before I get control.

Is there a way to prevent the selection from being rendered on ctrl-
click while still allowing my javascript to react to the event?

View 6 Replies View Related

Stopping And Starting A Gif Using JS?

May 7, 2004

I have a gif animation that I want to stop when the user mouses over the gif, and restart when the user mouses out. Is there a way to stop and start gif animation with JS? Or will I have to use Flash instead?

View 3 Replies View Related

Mouseout Stopping A Function

May 12, 2006

I have a function that is activated by a mouseover. The function
triggers an image rotation. I need to stop the rotation on the
mouseout but I don't know how to do this. the mouseover triggers the
rotate() function below. currently the mouseout produces the default
image but then it keeps cycling the other images.

<script language="javascript" type="text/javascript">
if(document.images) {
bubbles = new Image
off = new Image
bubbles.src = "images/bubbles.jpg"
off.src = "default.jpg"
}
else {
bubbles = ""
off = ""
}

adImages = new Array("images/whitemarble.jpg", "images/bubbles.jpg",
"images/oak.jpg")
thisAd = 0

imgCt = adImages.length

function rotate() {
if (document.images) {
thisAd++
if(thisAd == imgCt) {
thisAd = 0
}
document.ImgField.src=adImages[thisAd]
setTimeout("rotate()", 3 * 1000)
}
}
</script>

View 4 Replies View Related

Stopping Animated Gifs

Feb 16, 2007

I'd like to write Javascript that stops animated gifs from animating.

On Firefox, at least, window.stop(); does the trick, although it stops
everything on the page and is kind of unpredictable. If I connect it
to the onload event, sometimes only half the page will be displayed.
Does the onload even fire before rendering?

Does anyone know a reasonable way to accomplish my original goal of
stopping animating gifs from animating?

View 4 Replies View Related

IE Not Stopping Default Event

Apr 5, 2007

I'm currently overriding function keys (F1 to F4) to perform other
actions. In order to do this the default popup windows of Help (F1),
Seach(F3) etc must be turned off. In FF it's easy enought to do using
the preventDefault and stopPropagation event functions.

IE's equivalent is supposed to be cancelBubble and returnValue,
however I can not seem to get them to stop no matter what I try.

Can someone please point out my error? The test code is below....

View 6 Replies View Related

Stopping A Switch Function?

Nov 19, 2011

I have a switch function with four cases: each case executes a sequence of six css changes.How to stop it, if the viewer wants to abort, by choose another menu option?I've done a trawl, and the closest I've come to finding something which could be adapted is from this site,by MattEvans, a while back, buit it had to do with a loop in the function to be stopped:create a public/global variable called "stopped", set it to false when you start the loop.inside the loop put:

if(stopped){
break;
}

then when you press "cancel" set the stopped variable to true .So, maybe something like

var=stopped
function wrapSwitch() {
if(stopped){ break; }

[code]....

View 8 Replies View Related

A Timer Stopping Problem?

Nov 17, 2004

I have a code like below, and want to make to button working I tried but couldn't make it work. When the page loads the timer starts ticking from 5 seconds but the stop timer button is not working??? Code:

View 2 Replies View Related

Stopping Location Load

Sep 17, 2005

If I have a submit button like

<input type="submit" value="submit" onClick="Check()">


how do I keep it from loading the action part of the form when clicked if Check() returns false.... Say check is:

function Check()
{
var flag = true;

if(document.someForm.someInput.value == &#391;')
{
flag = false;
//Therefore I don't want the page to go to another page..
}}

Can I somehow stop the submit buttons operation if a certain condition has not been met.

View 2 Replies View Related

Stopping A Link From Working?

Jan 11, 2010

The site I'm working on can be found at:http://autumnjonesdesign.com/proofs/...of2ivinex.htmlThe link to GOOGLE on the left side of the screen doesn't work.I've found that if I remove the jquery-1.3.2.js from the page the link will work perfectly but then my desired effects go down the tube.I am in no way a javascript coder, any help on figuring out what in that js file is stopping the link from working without affecting the overall site effects and layout?

View 1 Replies View Related

Stopping A Function So It Can Restart

Dec 10, 2010

I have this function:

Code:

function startAnimation() {
lastVertex = 0;
k=0;
i = 0;

[code]....

but if you click the button again, the original function continues working while the second one executes.Is there some way that that button click can say "stop the first one and start the next one"?

View 9 Replies View Related

Refresh Parent From IFrame Makes Refresh Loop In FF Only?

Jan 2, 2009

I have this code in a page that appears in my iframe if requested from parent:

<script type="text/javascript">
parent.rrr();
</script>
The parent code is:
function rrr() {
javascript:location.reload(true);
}

So, the person clicks a link from the parent, it does a php process in a hidden iframe, which then tells the parent page to refresh. The only problem is that it puts Firefox in a constant loop of refreshing. IE and Chrome work fine. They refresh once and stop.

Though the src code opens the iframe like so: <iframe src="" style="display:none; height:1px;" name="hdplus" id="hdplus"></iframe> Firefox seems to refresh the page with the memory of the child page being in the iframe, constantly looping the child request to refresh the parent.

Why won't Firefox just accept that no page should load in the iframe, as stated in the code? I need to stop this loop, which means I need to get firefox to reset the iframe as it reloads the page.

View 2 Replies View Related

Stopping User From Pasting Into A Text Box

Dec 21, 2005

I know this might sound weird, but I have a form where I ask the user to
enter their email address in one text box and then again in a confirm email
text box to make sure that they have entered it correctly.

My problem is that many users appear to type their email address in the
first box and then copy and paste it into the 2nd box.

If they typed it incorrectly the first time then all they have done is
confirmed that it is wrong.

Is there anyway that I can stop them pasting into the confirm email text box
so that they have to type it twice?

View 12 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved