I have a coldfusion data component that receives two arguments and runs a stored procedure and returns a large data set. I want to use a textbox with autocomplete its data is that result set. I do not want to convert the result set to an array for performance.
I am new to jQuery and I am trying to create an autocomplete textbox. When I use a small test database, it works fine but when I use my production database with over 3000 records, it slows to a crawl. It take >20 seconds to load the page and with each letter I type (even though I set minChars to 3), the browser times out asking if I want to continue running the script. My feeling is I need to use AJAX but I have never done that and don't know how to. I code in classic ASP with an Access database. Can anyone provide some sample code how to do this. Unfortunately I am under a time pressure to complete this project.
I am having a little problem trying to show a loader (An animated GIF) while some request to a database happens. I have a page where the user selects a YEAR and when they select it with AJAX I perform a request to a database to get all the values for that specific year.
The problem is that there is a lot of information (4000+ records) that I need to query and show in a table (Actually I didn't use a table I use DIVs that look like a table), and when the user selects the year the webpage freezes for about 5 seconds and then it loads all of the data.
Is there a way to sort of show an image loader gif while the data is being gotten? I tried putting the loader image in the DIV container while no year is selected and then once the request is done, I substitute the DIV container's contents (The image loader) for the data from the database.
I've started working with the jQuery UI 1.8 Autcomplete recently with remote data. I was pleased with the ease of initial implementation, but before long I ran into a classic race condition.As I type, the search query gets more specific, so it takes less time for the server respond. As a consequence, it is possible for the old response to arrive after the most recent one. Obviously, this is producing undesirable effects.I'm a little frustrated that the plugin doesn't have a way to manage this. To me, it seems that it makes the "basic" remote data implementation unreliable in most real-world situations. It also seems as though this would be a common problem, but I've found very little literature on it.
I've found that autocomplete is a relatively new addtion to jQuery UI, so I've put the frustration aside and started my own widget which extends autocomplete to solve for three things: 1) race conditions; 2) animated open/close; 3) caching.The nature of this post is two-fold. Not only to share information I've gathered on the topic of race conditions with others who might be having the same trouble, but to (hopefully) gain some insight to how other people are solving for this.The first piece of this puzzle was that $.ajax() (and related methods) return an XMLHTTPRequest instance. As described at stackoverflow.com, this grants us the ability to use XMLHTTPRequest.abort() method. So I just keep a handle to the XMLHTTPRequest instance, and if it exists, call abort() before the next request is made.Using a firebug, I could see that the requests were being aborted as expected and the symptoms of the race-condition ceased. So far, so good... then I got to IE. Not so much.In IE, I was seeing run-time errors. The odd thing is that the run-time errors seemed to be coming from deep within jQuery UI, rather than my code yet commenting out the abort() avoided the run-times. After scratching my head for a while, I used the following simplified code to shed some light on the situation:[code]
In Firefox and Chrome, behavior is as expected - no alert box. However, in IE6 and IE8 (IE7 untested at this time), the success handler still fires! As it turns out, the run-time errors were because the response was undefined as it got passed through my success code path. My next thought was, "maybe I can just evaluate textStatus". Unfortunately, it turns out (as seen in the alert box) it contains the string "success".
Here's the situation: I have a simple php file which retrieves data from a mysql database and displays it in a table. However, the number of records has gotten so large that retrieving all the data takes a lot of memory and the browser freezes.
I been googling for a solution and some1 mentioned something called live scrolling where the data is retrieved only when you scroll up or down. Since am just an amateur and not familiar with XML, XSL, etc; can any1 recommend some link where i could find some JS script with such a feature? one that's easy to get started with if possible...
I am using jquery autocomplete combobox I load more than 25000 data. I set minLength:3, delay: 700, When I start typing three characters, in the third character ie8 shows the "Stop running this script" how to handle this huge amount of data
I have a table I am populating with data from a DB, and have it sortable on the client side. When the table exceeds around 300 rows, I start running into problems with rendering and sorting it. I started out using Prototype to help with the sorting, but it appears that this results in a lot of calls to _getElementsByXPath, which are taking up a large percentage of the rendering time. I believe this call is occurring as the DOM is being parsed.
I am in the process of creating a site for real estate listings optimized for a mobile environment. One of the features that is desired would be a google map that loads listings as the user drags. One of the catches to this is that very few listings have included latitude and longitude values. Therefore, every time I need to add a listing to the map I first need to geocode it. Now with a few listings this is not really a big deal. However, the end goal would be to show all listings within the current bounds.Which depending on the zoom level could be anywhere from a hand full to several hundred.owever, when I attempt to load say 100 listings to the map it pretty much freezes and is fairly buggy after wards.
That said I was wondering if there is a better way to handle this. Perhaps submitting the listings as places with a CRON and having markers generated automatically? I am just trying to think how I can achieve this in a way which doesn't kill a mobile phone because it seems impossible considering there could be over 5000 listings in bounds of the map area. The only real solution I have is to only show say 30 or so and use pagination for the next 30 and so one within bounds.The ultimate goals is when the map bounds change ALL listings will show up within that bounds. The way I have currently approached this is that when the user stop dragging the map a asynchronous request pulls in ALL listings within bounds as an XML those full addresses are geocoded and added to the map. However, this is wrecking havok on the browser and I am not even going to try it in a mobile environment considering its dragging a desk top down. I'm thinking this is less and practical and pagination has to be used but perhaps someone out there has dealt with a similar objective.
Does anyone have a library or patch to call a handler if a user leaves an autocomplete field without choosing one of the autocomplete options - i.e. they've entered free text. I'm working with an app that populates multiple fields from a single auto-complete value, and our latest requirement is to clear out a bunch of fields if the user's entered something manually - rejecting autocomplete suggestions. My initial attempts at hooking into onkeyfoo and onblur haven't lead anywhere productive, and I'm hoping someone else has managed to overcome the gnarly event and timing dependencies involved with onkeyfoo and blur being used for standard autocomplete behaviour.
I have found two jquery plugins and i am trying to combine an action but to no avail. what i want to do is after selecting an item from the auto complete box i would like for it then to do a change function and retrieve details. Here are my 2 pieces of code.
'm coming from the Java/Flex world and trying to get my mind around jQuery/HTML5 to evaluate how you would build a large scale application using them. One issue that I can't quite grasp is how to deal with HTML element IDs. My understanding is that jQuery allows you to manipulate HTML elements by referencing them by ID (there are other ways but those seem to require grabbing a list of elements and sorting through them to find the right one) In a large application with namespaced code how do you deal with dynamically created elements and the IDs the elements may contain?
For example, lets say you have a dashboard app that can contain a number of reports, each report is basically a div with the report content (a chart or table) and some associated views that can edit the report's data model. How can I assure that IDs for the report's subcomponents don't collide with IDs elsewhere in the application? I can envision some programmer working on a large project in a team naming a custom widget 'MyWidget' and then some other programmer naming their widget 'MyWidget' effectively causing two 'MyWidget' IDs to be assigned to different elements.
In the OOP world this isn't an issue because programmer one's widget is really something like MyForm.MyDiv.MyWidget and programmer two's widget is MyForm.MyOtherDiv.MyWidget allowing them to have unique names.
This could just be a fundamental misunderstanding of how things work in HTML but from what I've done every ID assignment is basically a global variable.
I have a website using jQuery that for the most part works fine, but it contains a very large form with a lot of fields. I have an option to save the settings from the form and to load and retrieve them from the server. The problem I'm running into is that the loading settings involves changing so much in the DOM (the form is huge and contains a lot of fields) that it seems to be freezing up on some browsers or timing out. I can't reproduce this on my computer (although it does take awhile to finish processing) but I've gotten enough reports of the problem that I'm looking for some advice as to how I can speed it up some.
The site is [URL] I've tried to speed it up by caching a good chunk of the selectors I'm interacting with and I'm using IDs to access the fields in most circumstances. But I'm not sure what else I can do to really optimize the loading. how I can go about improving on the load speed?