I'm trying to update a table based on the results of a database query returned via JSON. My goal is to show the progress of a queue, removing entries that have completed. Firstly I need to populate a table with the results of the JSON. I have:
I am trying to build a webapp for questionnaires where I can defined the questions in json, and have a single html page using jquery to build the UI. Since there will be a finite number of question types, e.g free text questions, multiple choice questions my code can choose how to render each type appropriately.
what is considered the best approach to build a UI like this?
I have seen the manipulation api with methods such as append() but I'm not sure if appending the html tags via strings (e.g. "<input id='answer'/>") is going to be the best way to achieve this, or whether there is a better way to define snippets of html for the different question types and copy them into the page as necessary?
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've been trying just about every sort function I could google but they do not work becuase I am building the table I want to sort dynamically from XML - then appending it to the page using innerHTML. No HTML gets written to the page, hence there are no HTML values to iterate through to sort. Does anyone know a way to capture values that have been extracted from the XML file and then sort them based upon the users selection?
I have a html file that I want to load, loop through the json data and for each json entry I want to add a new block of the html and insert the json data into the matching div/class of the html. json looks like this:
So for each json entry of name/age, I want to insert that into the html, and then add another row, until all json data has been fetched. After this I want to insert all of this into #box, which is just a divthat should contain that html. Looping like this obviously does not work, since I just keep replacing the same html through the loop.
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.
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 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.
I think I have a varialbe scope problem here, but I can't figure it out. What I'm trying to do is extract a piece of data from a JSON file using a variable established earlier in the script as one of the keys.
When I run this script I get the alert that lets me know that the variable "theMappableItem" has been established correctly. I click "OK" in the alert box. Then in my console (in firebug) I see a line showing that the .json file has been gotten successfully. Next in the console is an error that says:
I'm a complete newbie to JSON and I'm trying to make some sense out of itI think that what I want to achieve is fairly basic, but I have no clue where to begin. Here's my problem:I want to get the information from this JSON-string, fetch the value for realm_rank and display it within a header-tag in my html-code.
I have used getSON() successfully before but I am meeting with an issue which I don't seem to get a hold on. The data object returned is not populated correctly by getJSON(). Am I doing something wrong?