Variable Not Updating Fast Enough?
Sep 16, 2011
I just wrote some javascript with a counter to call an ajax call of many records, but when it is around the 50th record the counter variable is not updating in time for the next ajax call resulting in duplicate results cause ajax is pullin the previous query again
View 4 Replies
ADVERTISEMENT
Oct 23, 2010
I have a slideshow that also has links to allow the user to pick which slide they want to go to. That works okay for the most part, but once the user has selected a slide the slideshow continues to run, which I want to happen, but it continues to the next slide from when the loop function ran initially instead of the next slide in the show from the current slide. I tried recalling the function from the link function, but that really didn't do anything. I realize...at least I think that I realize that the function needs to be rerun from the new value of the count variable, but everything that I've tried to make it do that has been a colossal fail.Again I'm a novice here and this has to be written in plain javascript, otherwise I'd have gotten this done via jquery in probably 3 lines of code.
Here's what my code is looking like right now:
<script type="text/javascript">
<!--
//preload images
[code]...
View 3 Replies
View Related
Jul 20, 2005
I am having a problem with Netscape 7.01 & 7.02 not updating a
variable value in javascript. I have stepped though my code with a
debugger, and the values and code all look correct. This problem is
not happening in Netscape 7.1, but I really need it work at 7.0x
because many users use these browsers, and it would be a annoyance to
force them to update their browsers.
Is there a way in javascript to force the browser to update the
dynamic variables? I'm pretty sure this is a browser bug, but would
like to find a way around it with my own code.
View 1 Replies
View Related
Feb 13, 2009
I have a script that I have been using for a while that works with 3 sets of div tags. The first is visible and the second two are hidden. Using a select menu you can swap which div tag is visible by selecting that option.
Now this works fine using <body onload="opts();"> to call the function the only problem is that the page I am running this script on has a lot of images and the second two tabs are visible until the page has completely finished loading. This is only for a matter of a second or two but still a problem.
I am not very smart when it comes to JavaScript and I have messed around with adding window.onload = opts(); to the script but kind of unsuccessful. This works in the sense that the second two sets of div tags are invisible from the start of loading the page. There are only two problems with this solution.
1. The script isn't functional (can't swap visibility on div tags) until the entire page has finished loading. -- I can live with this if I have to
2. There is a javascript error message in IE 'null' is null or not an object. This could potentially scare some people away when they see they yellow triangle in the lower left-hand corner of the window.
Here is the code I am using:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Test Page</title>
[Code]..
View 1 Replies
View Related
Aug 28, 2009
I have pulled this javascript text rotation from a simple tutorial. I can't figure out how to get the rotation speed to slow down. I think I need another variable but not really sure. This is what I have:
<script type="text/javascript">
if (document.all || document.getElementById){ //if IE4 or NS6+
document.write('<style type="text/css">
');
[Code]....
View 2 Replies
View Related
Jul 9, 2011
This script has been around a while (I know it's old) but it works in IE when you mouseover an image...you can make text scroll up or down.
The problem is it goes pretty fast, even if you use the lowest speed (1). Is there a way to slow it down. Or a better script lying around anywhere? code...
View 2 Replies
View Related
Jun 21, 2009
I use superfish horizontal nav-bar style. Subcategories appearhorizontally below categories.The problem is that when I take themouse from the category name to reach one of their subcats, thesubmenu disappears! The subcategories disappear too fast! Is there away to fix this?
View 1 Replies
View Related
Dec 28, 2009
I have some code that I use to read an XML file:[code]This code works great for small XML documents, but the one I just received that I need to search is like 26MB and that would take forever. I was wondering if there is a faster way to do this with either JS or if not then maybe PHP? The only thing I could tyhink of so far is to just separate the large file into multiple smaller files.
View 14 Replies
View Related
Feb 12, 2010
I've been busy developing a new version of my quicksearch plugin. it's now a lot more flexible, plus lightning quick! [URL]
There's more information over at Github too: [URL]
View 11 Replies
View Related
Jul 23, 2010
I'm having some trouble and I don't know why.
I have the following clickable image:
PHP Code:
It invokes an AJAX script.
If I change the type to button, it works great.
Tried this in IE, FF and Chrome.
I've got to get this working fast!
View 1 Replies
View Related
May 13, 2009
I'd like the be able to use the native atob() function, but as I need the data as a byte array rather than text I would then have to convert it. atob() is much faster, taking only 1.2% of the time of the pure JS function. However, converting the decoded text to a byte array is very slow, so that the combination of atob() plus converting to a byte array ends up being almost twice as slow as the pure JS decoder (which converts the data to a byte array as it goes.)This is my current code to convert a string to a byte array. It's probably the simplest code, but it's definitely not fast.?
Code:
var bytearray = Array.prototype.map.call(text, function(x) {return x.charCodeAt(0);});
View 1 Replies
View Related
Feb 17, 2010
I have some simple code to add and remove a class when an li element is hovered.
$("#nav li").hover(
function(event) {
$(this).addClass("hovered");
[Code]....
The hovered class just adds a background image. When I quickly hover over the list, sometimes the background image gets stuck so it seems like the "hovered" class never gets removed.
View 3 Replies
View Related
Mar 18, 2010
[URL].. I have used some jQuery to hide two divs (#choices and #review) until a selection of "yes" or "no" is made. My problem is that as the page loads, these div's are displayed for a split second until the jQuery hides them. Can anyone tell me a better way or a fix for the existing code that I am using?
View 4 Replies
View Related
Jan 13, 2011
I'm using clueTip 1.0.6 and jQuery 1.4.2. The tool-tip will appear if I mouse over the cell slowly. Fast mouse over the cell does not bring up the tool-tip. But it will if I mouse over it again (fast one). It's happening in IE, Chrome and FF.
Here's what I have:
<td onmouseover="showcluetips('tableidxxxxx',106,500);">
function showcluetips(tableid, itemid, delay) {
$("TABLE[id='" + tableid + "']").attr("rel", "Content.aspx?itemid=" + itemid).cluetip({
showTitle: false,
[code]...
View 4 Replies
View Related
Jul 1, 2010
I have a site that made extensive use of javascript event handlers embedded in the html. I am trying to port the code to jquery and I notice that after the conversion, pages don't scroll as fast or smoothly as they did before. I actually notice this on many sites that make use of jquery or some other jscript library. What causes this behavior, and is there anything that can be done to minimize the sluggishness of the site?
View 1 Replies
View Related
Aug 3, 2011
I am using both these functions for the purpose of slider.But when you leave the tab & come again. The slider moves so fast.
Looks like it clears the interval automatically.
View 3 Replies
View Related
Aug 10, 2011
i'm New to JQuery and I recently had a problem with encorporating a transition at the beginning and end of my carousel. I found that by default it would Fast Forward/Fast Rewind through all the images at the ends, rather than just jump to the slide and wrap.
I've managed to solve the issue (bar a transition effect from the last slide back to the first) it now jumps to slide one, rather than rewinding through all the images. However (and i know this sounds silly) but i'm having trouble doing the reverse. I'll add both the zip file to show a working model if interested and also post the 2 relevant functions :)
[Code]...
View 12 Replies
View Related
Jul 20, 2005
I was wondering if anybody could help me out a little. My goal is to
update some information about a system every 2-5 seconds. The
information needs to be displayed in some sort of table, but the size
of the table needs to be able to shrink and grow. The main problem
here is updating the table without refreshing the entire page and
making any clicking noises. I was thinking maybe I can put the table
in an iframe and use javascript somehow to update the iframe whenever
neccesary.
View 2 Replies
View Related
May 17, 2011
I have <div id ="changeable"> with some html in it. I have a link that calls the function to replace the info in the div. The problem is that the "creative_development.inc" file is added to the top of the div and does not replace the content. How do I replace the content, and not just add content?
View 1 Replies
View Related
Dec 4, 2009
I'm creating a simple auto updating script based on PHP and using jQuery to set the interval to 1000 miliseconds. It works in FireFox, as the only one I've tested so far, but in Internet Explorer (Version 7 right now, didn't test others) it just freezes and doesn't auto update. Doesn't auto update either if I refresh the page, so something's messed up here.I'm using the same way of auto updating on other things, such as a chat-page - works on those in all browsers, so I'm kinda on a lost track here.
Here's the JavaScript/jQuery:
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
[code]....
View 2 Replies
View Related
Jan 19, 2006
I've not done much in the way of JS, if really anything other than using javascript.com before, so this may be me bieng quite m00bish, but I am having problems with my script on a page.
In a nutshell, the script I have currently allows my viewers to make a selection from a drop-down list, and as a result, the embedded WMP object below starts streaming the selected video.
WMP gets the video name from the VALUE= element of each list item.
My aim is that as well as the page starting the selected video, that a paragraph of text will appear under the WMP object based on the selection showing information regarding that video.
I've tried playing with a VAR element, and then using document.write to print the variable name to the screen, but this only writes the value of the variable at the time of page loading, and does not refresh.
View 2 Replies
View Related
Apr 14, 2006
What I am trying to do is assign a value to unchecked checkboxes. To do this I am running a function upon the submission of a form that checks the boxes for a value, and if they are not checked, assigns a value to them. I though I had it working, but for some reason I am getting a syntax error with the line that contains the "else"
My code is as below. The form name is deleterows and the form is dynamic so there can be any number of checkboxes (hence the for loop). Code:
View 5 Replies
View Related
Nov 12, 2004
I'm trying to make a physics program and have run into some trouble when i tried to update the div element by using the document.getElementById("target").innerHTML=c command, its in a loop and is supposed to update through every increment of the loop, but rather it only updates when it reaches the end of the loop. Here's the code:
View 3 Replies
View Related
Jan 29, 2010
I've made a simple ajax script that's supposed to update a captcha image. The only part that doesn't work is where the new image replaces the old one on the page. The problem is that they both have the same source name which means that if I just update the image src, or the innerHTML of the div surrounding it, nothing happens, since the image src is the same and so would the innerHTML be.
View 1 Replies
View Related
Mar 11, 2011
I'm using jQuery 1.3.4 right now, and I have the problem where .css is not updating the style information of two items:The code below produces the underlined lines of output. The red parts show where I expect my calls to .css to update the values, and I do not see updated values. I've added '//FAIL' after the lines that aren't doing what I expect them to do, and also highlighted them in red.nyone have an idea what I might be doing wrong, or what might be causing this?
Element X (701.4833374023438) Y (284.41668701171875) W H cont(PM_MENU 499.48333740234375 217.06666564941406 200 47 itc() 501.48333740234375 284.41668701171875 200 13 INITIAL submenu (PM_BC_MENU) 86.58332824707031
[code]....
View 3 Replies
View Related
Mar 25, 2009
I have a program that via an html form asks the user for information. When the user clicks submit a function is run that checks the values, if the values aren't of the correct type (nan etc) then an alert box pops up. If not then it proceeds to the results.
My problem is that the values of the fields in the form are picked up when the submit button is first pressed but when I correct the field errors and press submit again, it throws up the same errors in the alert box.
So how come the first time I press submit it gets the updated values of the variables (which contain the form values) but the second time it doesn't and I have to refresh??
View 4 Replies
View Related