Javascript Often Very Slow

Sep 17, 2007

We're developing an ASP.NET / C# intranet application. All users use
Internet Explorer 6.0 and JavaScript is always enabled.

In a HTML table, we use an onclick event on each tablerow and in that
onclick event (javascript) we save some values in hidden fields.

Most of the time, this works very fast, but it also happens a lot of
times that the internet browser respons very slow or gets stuck. We
really don't know what causes this, because in the javascript we do only
simple things such as setting values in hidden fields.

Is there anyone who recognizes this problem and knows some possible
solutions?

View 4 Replies


ADVERTISEMENT

Why Are My Rollovers So Slow?

Nov 8, 2007

Images are cached by the browser depending on the headers sent by
the server. If the server does not send sufficient information
for the browser to decide the image is cacheable, the browser
will check if the image has been updated every time you change the
src of an image (in some user settings). To overcome this you
must send suitable headers.

View 7 Replies View Related

Slow Preload For IE

Jul 20, 2005

Has anyone else had this issue? Basically, the preload of images for a
rollover effect for the navigation is really really slow when using IE
6.0 but when i view the site using Netscape, it's fast like it should
be(no lag!)

My problem is that since 96% of users use IE, i need to figure a way
to fix this. Below is the javascript currently being used. The
arguments are passed in before the script is called.

MM_preloadImages(
'<%=assets_path%>/left_nav/manage_view_wthr_on.gif',
'<%=assets_path%>/left_nav/manage_admin_guide_on.gif',
'<%=assets_path%>/left_nav/manage_terms_cond_on.gif',
'<%=assets_path%>/left_nav/manage_reports_on.gif',
'<%=assets_path%>/left_nav/manage_account_info_on.gif',
)


function gn_rollover_preload(){
//preloads middle images for the navigation
if (document.images){
var argLength = gn_rollover_preload.arguments.length;

for (arg=0; arg < argLength; arg++){
eval(arguments[arg] + "_off = new Image()");
eval(arguments[arg] + "_on = new Image()");
eval(arguments[arg] + "_left = new Image()");
eval(arguments[arg] + "_right = new Image()");

eval(arguments[arg] + "_off.src = '" + ASSET_PATH_HEADER +
"button_nav_"+ arguments[arg] + "_off.gif'");
eval(arguments[arg] + "_on.src = '" + ASSET_PATH_HEADER +
"button_nav_"+ arguments[arg] + "_on.gif'");
eval(arguments[arg] + "_left.src = '" + ASSET_PATH_HEADER +
"button_nav_"+ arguments[arg] + "_left.gif'");
eval(arguments[arg] + "_right.src = '" + ASSET_PATH_HEADER +
"button_nav_"+ arguments[arg] + "_right.gif'");
}

// Now Preload all "corner" images for faster swapping
corner1 = new Image();
corner2 = new Image();
corner2_both = new Image();
corner3 = new Image();
corner3_both = new Image();
corner4 = new Image();
corner4_both = new Image();
corner5 = new Image();

corner1.src = eval("'" + ASSET_PATH_HEADER +
"button_nav_corner_1.gif'");
corner2.src = eval("'" + ASSET_PATH_HEADER +
"button_nav_corner_2.gif'");
corner2_both.src = eval("'" + ASSET_PATH_HEADER +
"button_nav_corner2_both.gif'");
corner3.src = eval("'" + ASSET_PATH_HEADER +
"button_nav_corner_1.gif'");
corner3_both.src = eval("'" + ASSET_PATH_HEADER +
"button_nav_corner3_both.gif'");
corner4.src = eval("'" + ASSET_PATH_HEADER +
"button_nav_corner_1.gif'");
corner4_both.src = eval("'" + ASSET_PATH_HEADER +
"button_nav_corner4_both.gif'");
corner5.src = eval("'" + ASSET_PATH_HEADER +
"button_nav_corner_2.gif'");

}
}

View 2 Replies View Related

Mouseovers Slow In IE?

Apr 21, 2005

Code:

As far as I can tell, there seems to be a distinct lag time in IE before the switch from the 'off' to the 'on' image, and vice versa, which doesn't seem to exist in Mozilla.

Is this something that can be fixed by tweaking the script?

The script, btw, is pretty ancient, so I expect it may contain some outdated stuff. I found it years ago when looking for a script that would allow me to easily customize the number of target images changed by a single onmouseover/onmouseout action. Since I don't actually know javascript, I tend to stick with the ones I've learned to at least do basic customization of.

View 5 Replies View Related

Site Slow In IE7 - Speed It Up?

Apr 6, 2010

I've got the following site that loads great in FF and Chrome (no surprise), but is terribly slow in IE7. It's even quick in IE6, but not 7. Here's the site code...

Now I'm using JQuery in a couple places, but it's by no means nothing crazy. The page is fairly simple.

I thought of preloading the main content images, but even after they are loaded in the cycle, the loading time is still slow.

View 10 Replies View Related

DIV Invisible - Fade In / Out Too Slow

Aug 19, 2010

I have a div that is invisible all the time, and when one popup is activated, that div will fade in to darken the website background, like this:
And I'm using the following code when the darkness appears:

PHP Code:
function raiseOpacity(obj,counter) {
obj.style.opacity = counter/100;
counter +=2; //Raise 2% each time
if(counter < 100) setTimeout(function()
{raiseOpacity(obj,counter)},10);
//Repeat the incrementation again}raiseOpacity (document.getelementbyid('example'),0); 
//Just an example of how the function is called.

But it is too slow, the browser hangs alot while doing this. Is there a faster way to do this fade in stuff? I've seen a lot of websites that do this and the browsers is fast, but I couldn't extract the code from them.

View 4 Replies View Related

X: X_drag.js And Slow Computers

May 6, 2004

i've encountered a problem with the way the drag events are handled in this file, but it had an easy fix. I have a slider (a draggable div) and dragging it involves a lot of processing power. The problem arises if the mouse pointer seperates itself somehow from the element being dragged (by, say, a spike in CPU usage or something). the x_drag library file registers a mouseup listener on the object which is being dragged, but that doesn't do any good if the mouse pointer tracks so much as one pixel off the dragged element.

I've encountered this in almost every situation where i have draggable elements. Thankfully, it's a real easy problem to solve: if the mouseup events are registered on the document itself, there's nothing to worry about, because any old mouseup will end the drag.

View 1 Replies View Related

Slow Loading Site

Apr 1, 2006

I put a javascript for a preload in it and it hasnt helped the front page. Right now the header is swish and we took that out and it still took over 2 minutes to download on DSL. I do have the JS anthology book but the script in there didn't work for us. Come to think of it I have almost all of the sitepoint books. Does anyone have any suggestions.

View 3 Replies View Related

Lightbox 2 And Slow Connections?

Sep 10, 2011

I have installed Lightbox 2 Lightbox 2 for a client's site redo, and we are concerned about the opening speed of Lightbox for those on a slower Internet connection. Lightbox is only for those visitors who want to see images in a larger view. Is this something we should be concerned about? Are their other choices that would be better?

View 1 Replies View Related

Huge Table Slow In Loading

Jul 23, 2005

I try a few grid table and they are nice BUT loading thousand rows of data are slow.

May be there is any simpler yet attractive table style format I can use just to beautify the current <table> ?

View 1 Replies View Related

Ultra Slow Form Submitting

Jul 23, 2005

Recently submitting forms (specifically forms which have javascript attached
to them with the submit function) has become very slow. The browser appears
to sit there for seveal seconds doing nothing (the page also becomes non
responsive) and then suddely loads quickly. This happens on all of my
computers... What's happened to javascript? Is there some setting that's
been turned on that I'm missing?

View 2 Replies View Related

Window.onresize Slow (firefox)

Mar 19, 2007

I am attempting to modify the style of an element (its width) as the
window is being resized, in firefox.

Long story short, I've tried to use CSS but one particular part of the
layout just won't do what I need.

The javascript solution assigns a function to window.onresize that
sets the inline style, it works with one problem -- the handler only
gets called after the resizing stops, and so there is noticeable lag
before it redraws.

It is not the function that is taking a long time to execute, its
appears to be firefox's handling. It doesn't call it as frequently as
I expected.

Is there another javascript method to accomplish this without the
extra lag?

View 2 Replies View Related

JQuery :: .ajax() Seems To Be Too Slow For Key Events

Jun 12, 2010

I have a problem with the jQuery.ajax() function combined with a keyup event (i think key events in general). I'm binding an keyup event to an input field so that on every change the current input is send via the ajax function and receives new data from the server, displaying it in a selectbox.

when I'm typing very fast it seems that the ajax function is too slow for this and shows up old result elements. After triggering the event another time, e.g. via UP,DOWN,.. it receives and displays the correct data.

View 1 Replies View Related

JQuery :: Animation ScrollTop Is Not Slow / What To Do?

Dec 6, 2011

I have following code to have a scroll animation effect. The cod eis triggered e.g. by a click.[code]...

The problem is, that the browser (tested in FF, Chrome, IE9) just jumps to the scroll target, no effect is viewable. I googled the code in different places, everybody else seems to have no probs with it.

Any ideas what I'm missing here?

View 1 Replies View Related

JQuery :: Drag And Drop, Very Slow?

Dec 7, 2007

Please the link to see what I have done so far...[URL]... It is a day planner, where various places can be dragged on to the day planner. It works, but it seems very slow. Running firebug profile when dragging a simle place into a single slot tells me that over 35,000 calls were made.

View 7 Replies View Related

JQuery :: Ie7 Slow Searching By Class Name With 'each'?

Mar 12, 2010

I've read a lot about how slow IE7/javascript is, but I thought I'd share this test. I have a complex page with about 15 tables of class XYZ. I timed this:

[Code]...

View 4 Replies View Related

Mouseover Really Slow On Automatic Scroll?

Dec 7, 2009

I have a div of 300px of height. I'm trying to make a automatic scroll when I put the mouse cursor at the div's top (y>0 && y<50) and the div's bottom (y > 250 && y<300), but the reaction is too slow I'm trying to use timer but nothing changes.

[Code]...

View 2 Replies View Related

Gallery Script Running Slow In IE8

Sep 10, 2010

My gallery javascript is running very laggy in IE8. Here's an example: [URL]. It works fine in chrome, but it's slow when using IE.

View 3 Replies View Related

Slow Down Flyout Menu On Hover With Some JS?

Mar 12, 2009

I need to slow down my flyout menu on hover with some JS? Is this possible? Here is what I got! I have a pure css flyout (flyin - what ever you call it) menu, and I simply am looking for some JavaScript that will enable it to fly in a little slower. You know, with CSS, it's either there or it's not. So I'd like to animate it a little more.

Edit - actually, I think it's called a slide-in.

View 2 Replies View Related

Why Two Tags Menu Together Cause Loading Slow

Oct 30, 2010

I want use two jquery tags menu in one page.I tested each one alone, even more than 10 pages, they all loading correctly. When I open the page, then can stay in the div position they should stay.But when I conbain them together, there will be caused that when I open the page, the pictures will drop down untill all the pictures have been loaded. Then they come back to the position where they should stay.

HTML Code:

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.1/jquery.min.js"></script>
<script src="http://gsgd.co.uk/sandbox/jquery/easing/jquery.easing.1.3.js"></script>
<script src="http://spaceforaname.com/js/jquery-galleryview-1.1/jquery.galleryview-1.1.js"></script>

[code]....

View 1 Replies View Related

Slow Loading W/ External Script

Jan 23, 2004

In my page, I have to load an external javascript (it's an ad serving code, using src='....') and once the external site is not accessible, it slows down my site significantly (to a level that unacceptable to visitors). Is there anything I can do to prevent this? Or anything the ad server needs to change?

View 1 Replies View Related

Image Swap And Slow Loads

Jun 14, 2011

I am working on a demo for a movie site, and 90% of everything seems cool.[url]...

I am doing php.flushes, .htaccess caching and using PNGs to help with performance. I might start using another sub site to grab all the scripting from to increase performance, but it seems a tad bit slow at the moment.

- There are a few issues one being when you click on X-Men and look at the gallery the images seem to flicker sometimes going from image to image.[code]...

View 2 Replies View Related

Iterating Through List Of Inputs Is Too Slow?

Feb 15, 2010

The web page I'm fixing up has a list of radio buttons that can be very long (10,000+). We have to loop through the list to find the one that has been toggled, but this results in IE throwing the error stating that the script is taking "an unusually long time to finish." I've added a break to the loop which should get triggered once the selected input is found, but that doesn't seem to have made a difference. Is there a better way to handle this scenario? My code is as follows:

[Code]...

View 6 Replies View Related

Slow Loading Time For Slideshow Gallery

Jul 23, 2005

I created an image gallery which displays 63 images in a slideshow. The
problem is that the show was slow because each image loaded one at a time
during the show. No problem right? I just did a preload script. But then the
user has to sit for 5 minutes waiting for 63 images to download! My images
are about 640x480 and average 100kb. Is this too much for one page to load?
Should I load my slideshow into differerent windows? If so, don't I have the
same problem with my loading time?

View 4 Replies View Related

JQuery :: Closest And Parents Behaviour In IE Very Slow?

Sep 30, 2011

I have a table with 5000 rows. In each row I have an html element. myElementList is the list of those elements. Now I need to select all the tr's of these elements. I am using the following code.

[Code]...

This work great in FF. But when I run the same in IE 8. The browser hangs out and a popup messgae appears that propmt for to stop the script.

View 2 Replies View Related

JQuery :: Slow Response To AJAX Calls In IE7?

Jul 30, 2009

I am developing quite a complex user interface in jQuery that relies on an AJAX call to retrieve JSON.We have noticed that the code runs slow in IE7. IE8 and IE6 are acceptable. Firefox and Chrome really quick. I have traced the problem back to the AJAX call, which IE7 seems slow o process. What takes less than a second in the other browsers will take IE7 3 or 4. I have googled for an answer it seems there is some consensus that the native XHR in IE7 is slow, so it may not be a specific jQuery problem.Has anyone else experienced this? Does anyone have a solution? Please consider that this will be a public website, so the solution cannot involve altering settings on users' machines.

View 5 Replies View Related







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