I've run into an odd issue. I have a javascript which uses setInterval to keep a session alive. But, it seems that if the browser is left unattended for a period (either leaving it open over night, or out of focus working in another application) the setInterval is not firing in IE and the session is allowed to expire. This does not happe...
I have the following code, and it works fine until i hit the the #play button. I'm assuming it's because the var intID is set in another place and it's not in the same scope when i window.clearInterval() it... how do I fix this? BTW, this is the Google Maps API Version 3
function intervalTrigger(){
return window.setInterval(fu...
This js will take a value, subtract X amount from it, and then count up to that value.
I attempted to accomplish this task by doing a simple while loop, but I couldn't get it work.
I was wondering if anyone could comment on how or why the while loop method below doesn't work.
This is the only way I could get it to work:
function _in...
Hi!
I'm working on a jQuery plugin (a jQuery UI widget) called Smooth Div Scroll where I need to store references to intervals that are specific to each individual instance of the plugin on the page. If i just write something like this:
var myInterval = setInterval(function() {
alert("Hi!");
}, 100);
...the variable myInterv...
hey guys,
var check;
function showLoader() {
$('#mc_signup_form').prepend('<span class="loading"> loading …</span>');
check_init();
}
function check_init() {
check = setInterval('check_trigger()', 300);
}
function check_clear() {
clearInterval(check);
}
function ...
Hello. I'm using JavaScript/Jquery to make a page auto-update with a value from a database, although it doesn't seem to update in Internet Explorer. It works fine in FireFox & Chrome. Can anyone explain what's wrong? It looks like IE is just displaying a cached version of the page. How can I prevent this happening? Thanks.
function upda...
I'm using an interval for fade in effect of some objects in flash, but for some reason I can't get it to work if it's called on more than one object.
function fadeInPage (pageName) {
pageName._visible = true;
alpha = 0;
fade = setInterval(fadeIn, 15);
function fadeIn() {
alpha += 5;
pageName._alpha = alpha;
if (alpha>...
I'm trying to create a basic strobe light in the browser using the canvas element. I'm expecting setInterval to keep calling the changeBG function to change to a random background color. This function works fine on its own, but not when called by setInterval. I tried pulling up this page in firebug and it told me that colors was undefine...
Dear Masterminds,
I'm currently wondering if there is a better solution than passing this scope to the lambda-function via the parameter 'e' and then passing it to 'funkyFunction' using call()-method
setInterval(function(e){e.funkyFunction.call(e)}, speed, this)
(Minor question aside: I'd been reading something about memory-leaks in ...
if I am not mistaken eval executes valid code in a given string
eval("alert('hey')");
and
setTimeout("alert('hey')",1000);
does just about the same thing, only with a timer. is set timeout just as risky as eval?
...
I am trying to fetch pictures for a gallery using JavaScript, but I experience problems.
$(document).ready(function() {
var currentPage = 1;
var totalPics = 2;
var picPerPage = 1;
intervalID = window.setInterval(function() {
console.log(currentPage*picPerPage);
if (totalPics > (currentPage*picPerPage...
I have an ActiveX object (who source code I have) running in a browser (IE). The ActiveX object has a UI, which raises events. I want to respond to those events in the browser.
I don't want to invoke JavaScript functions from the ActiveX object events: and therefore, instead, I want the JavaScript to poll a method of the ActiveX object ...
Hey all,
I have two problems with the below javascript that I'm not sure why they're not behaving expected as they should. I'm almost positive it should work but it doesn't. First, the left button doesn't hide when the left most p tag (the first one) for group1 is active even though it should, and the right button doesn't hide when the ...
Hi All,
I am creating a rotating banner. I have a loader swf file which I unload and load with the the new swf file every 15 seconds using set interval. It's going ape shit though and I am not sure what is causing this. Could someone please have a look at my logic and let me know where I am going wrong please?
Many thanks!
var navArr...
Please can someone tell me why this isn't working before I defenestrate everything on my desk.
I have the following html document:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html";...
I am using Javascript's setInterval method to keep on updating the time of the Client computer. This is my code:
$(document).ready(function() {
setInterval(function() { setCookieForDate(); }, 500);
});
function setCookieForDate() {
var cookie_date = new Date();
var serverDateTime = '<%=DateTime.Now%>';
document.cookie =...
Hi, guys i'm new and i'm not english.
I have a problem with using js setInterval that simulate a user click, every X seconds, on submit button.
In the page there is only one h:form and h:commandButton.
I use a profiler and i see that the java.util.HashMap increase continuosly it's size.
After some hours the used heap size is growed a lot...
Hi,
I used the following tutorial to make a parallax content slider for my webiste: http://blog.themeforest.net/tutorials/create-a-funky-parallax-background-effect-using-jquery/
I got it working nicely, but wanted to add auto-scrolling functionality. I did it by adding jQuery.serialScroll and using setInterval but it works like crazy n...
Hi,
I'm trying to write a web app that uses Javascript to perform a fairly complex calculation (involves factorials and Bessel functions). When I run the script in IE, it gives me a warning that the script is unresponsive or taking a long time, and asks if I want to continue running it. I've read that to get around this, you can use e...
Hi Forum
This is someting weird...
I have a Flash-file that loads external SWFs. There I use LoadVars to get external data from a server. When the data has arrived, I'm using setInterval to call a function that fades-in the content.
So far so good.
But when I switch menus (a.k.a. unload one movie to load another) before all the data...