AJAX (Asynchronous Javascript And XML) is a popular technique for creating interactive websites, though other technologies (e.g. JSON) are often used instead of XML.

learn more… | top users | synonyms

3
votes
1answer
22 views

Loading and displaying JSON quickly in PhoneGap app

I have this tap event in an iOS app that I'm developing with PhoneGap. When I click on the left arrow, it finds the desired content and retrieves it from a JSON file. It then displays those results on ...
0
votes
1answer
19 views

Performing an auto complete look-up and building a form

I have written a jQuery function that is doing an auto complete look-up and then building the form for me. This is working fine but I want to reuse the code so I can have the form rebuild after ...
2
votes
0answers
18 views

Refreshing / Cycling through a parsed RSS feed every 5 mins

I am working on a monitor signage display and have a "welcome to RSS" feed with just a title and desc. I have code from feedEk that's been tweaked a bit to parse the feed and cycle it so I only have ...
3
votes
2answers
155 views

Generic method for HTTP GET/POST parameter conversion

I just made a method that should handle GET and POST parameters (primitive types) sent by AJAX requests to the server: ...
2
votes
1answer
37 views

Simplify double AJAX request for jQueryUI's autocomplete widget

I'm using jQueryUI's Autocomplete widget for a product search. The data is in a database, so as the souce I passed it an AJAX request. My problem is, that I need some data about the currently focused ...
2
votes
0answers
22 views

Upload multiple files in different formats and sizes from one HTML form

I have a html form with some text input fields and three file upload fields. two of them should be images and one should be a file (pdf). My code is working well but I feel this is not the proper OO ...
1
vote
1answer
63 views

Light, custom CMS for a site

I'm working on a light, custom CMS for my site and I am trying to use Ajax calls for most of the server-side interaction. I am still pretty new to web development, so if I am breaking any conventions ...
3
votes
2answers
73 views

Insert JSON data into rendered template after AJAX call

I have an already rendered template and I want to update it with some JSON data I obtain via AJAX. The template as it is before rendering looks like this (using ...
3
votes
1answer
45 views

Secure authentication using JavaScript module pattern and an AJAXified modal window

This code is not live, but for brevity I'll write as though it is. When a user clicks any element with the class name js-modalOpen, for example: ...
1
vote
0answers
36 views

AJAX/JSON based portfolio [closed]

This is a design portfolio page. On load, the JSON data is retrieved via ajax, and one of the keys is used to generate a list of '.project-links', however none of the projects are loaded by default. ...
3
votes
1answer
107 views

Database of Pokemon

I've just started to write jQuery and have just written my first code using ajax calls. I'm fetching data from the pokeapi and am using it to random generate new pokemon. I have refactored it as ...
1
vote
1answer
73 views

Checking form input for an AJAX request

I've made a few functions to check form input for an AJAX request. I am still getting used to JavaScript and some of these AJAX requests. I am looking for any suggestions to better work with ...
2
votes
2answers
276 views

Using jQuery and AJAX process a form with PHP

I'm looking to collect form input and pass it to a file called processing.php with AJAX JS: ...
13
votes
2answers
1k views

Is this form submission validator professional?

I have written some jQuery code for AJAX form submission: ...
3
votes
2answers
92 views

Better paradigms for posting JSON from a table?

With a table based interface where users can update the rows by pressing a button. Perhaps there is a better way of doing this, without pressing a button, i.e. post on textarea/row change (could be a ...
5
votes
2answers
110 views

Displaying styled validation messages to user

I'm new to AJAX and jQuery, and just for testing, I created this simple code. When the user enters their First Name and their Last Name it displays a message that says Thanks for entering ...
2
votes
2answers
177 views

Is there any disadvantage of using MVC Razor Syntax codes inside a NoScript tag?

I'm creating a ASP.NET MVC Website that display blogs from the database by AJAX. The problem is - I have limit the results to only 10 by default and add a Load More button to display 10 more results ...
-2
votes
1answer
122 views

Loading data from SQL server to webpage takes too long

There's a div in my webpage which will load data from an SQL server when the user clicks the button loadresource. Here's the JavaScript for button click: ...
4
votes
1answer
86 views

Random select in two MySQL tables

I wrote a simple AJAX request that performs a random select in two MySQL tables. The thing is, my current script involves connecting to the database and creating a new PDO every time the ...
4
votes
1answer
57 views

Calling PHP file using Ajax

I like to know if there will be any performance issue if an xmlhttp object is created every time. For example, in the below code: ...
2
votes
1answer
213 views

AJAX request authentication to PHP script

Recently I started looking at my AJAX call security and found some code that uses tokens, request and referer in an attempt to authenticate the call and stop XSS and CSRF. The AJAX calls are for the ...
1
vote
1answer
103 views
3
votes
2answers
136 views

Determining if an entity exists in a database via a stored procedure

Here is a short and simple Ajax method that returns "True" or "False" if an entity exists in a database via a stored procedure ...
3
votes
2answers
93 views

Ajax for RESTful web service

I wrote an Ajax function, which should be used in a framework to interact with a webserver. The (self-written) Java-Webserver can be used to fetch files and folder-contents, create files and folders, ...
2
votes
2answers
689 views

Interacting with database in MVC

When using MVC 4 Razor (I am new to web development), I get concerned about my understanding of interactions between the database and the client. Much like all appilications these days, there is a lot ...
4
votes
1answer
116 views

Script for dynamically-loading data onto a restaurant menu for printing

I have a script which dynamically loads data onto a restaurant menu for printing. Could the following code could be shortened at all? ...
2
votes
0answers
105 views

JavaScript eBay Listing Generator - revised

I posted my first attempt at this here. It's an app that generates both a preview of an interactive eBay listing, as well as the raw code which the user can copy and paste into their listing. I got ...
3
votes
1answer
43 views

Plugin for communication protocols in browser(s)

I would like to get some feedback from the community regarding a plugin I recently moved from requiring jQuery to a stand alone JS implementation. It is meant to handle browser communication ...
2
votes
0answers
385 views

Update database, refresh the page to show changes, show a success message

Follow up question for: Update database, reload page then show a success message I have a table of articles, in each row is a button to activate / deactivate the ...
2
votes
0answers
533 views

Ember.js file upload code

I am a newbie and tried to find the laziest way to do a file upload using EmberJS, jQuery and formdata (IE10+). The code might look stupid, but it worked. Can you please take a look and give some ...
3
votes
1answer
1k views

Update database, reload page then show a success message

I have spent a long time trying to find a way to do the following: Update a MySQL database with AJAX Reload the Page to show changes Show a success message I think I have finally found a way! ...
1
vote
1answer
58 views
1
vote
0answers
415 views
2
votes
1answer
75 views

Simplifying AJAX success code

Please take a look at this Fiddle. Is there a better way of building a table with titles in the first cell of each row, like this: ...
10
votes
1answer
90 views

Loading the resource identified by a script element's src attribute

I have a function to load the resource identified by a <script> element's src attribute. I need it to: Be as universal ...
2
votes
0answers
104 views

Correct usage of an MVC pattern in web applictaion

I have a method in my controller (GetAllPatients/EnrollmentQueue) which does return the correct data (an array of ...
2
votes
1answer
140 views

Refactoring a Instagram widget feed function

I've adapted a Instagram widget from this example so that it now appends 8 images to their respective IDs using a Instagram username. I want my widget implementation to be better and more efficient. ...
1
vote
0answers
128 views

JavaScript parameters - best practices for settings object/callback

I have the following function which runs as expected and is defined in the window object: ...
1
vote
1answer
121 views

Display AJAX response from PHP

I have used jQuery AJAX for my development. Below I have added example code for AJAX request and response. ajax.php ...
2
votes
2answers
94 views

Ajax Class Efficiency

So I wrote this class to handle my ajax calls simply: ajaxCon.php: ...
6
votes
2answers
363 views

Reusable Ajax object

I've been working on a new project and I've found myself needing to make multiple Ajax calls, often on the same page and at the same time. I decided rather than repeating code that I would try and ...
13
votes
3answers
179 views

Simplifying a repetitive event handler

Is there a more efficient way of writing this? It seems like so much redundancy that this can be greatly reduced. Basically the only difference is if isNodeWebkit ...
2
votes
0answers
27 views

Downloading and parsing list of Getcachine CWGs

I'm building a page that downloads a list of Geocaching CWGs for my country in XML, and then parse it. The structure of the XML looks like this: ...
1
vote
1answer
81 views

AJAX chat client

I have here a set of code that is used for retrieving and storing conversation for a chat application if found this from a tutorial and tweak it a little bit. This script works fine but my concern is ...
3
votes
1answer
143 views

Raw JS AJAX method

I built this as a simple example of using raw JS to perform a simple GET request with a data callback. Suggestions on how this could be improved in any way, while keeping it simple, would be much ...
2
votes
1answer
543 views

Website for updating a div

I've built a web site that uses AJAX to update a div. Most of the data displayed in the div is drawn from a MySQL database. All the pages are PHP. I've tried to follow best practices. I put all the ...
1
vote
1answer
53 views

Script for managing server IDs

I have a jQuery script and I should explain it line by line. I already do that and I want to make sure that is correct. If someone has any remarks, I will be very appreciative. ...
3
votes
1answer
259 views

Parsing XML data to be put onto a site with jQuery

I will preface by saying that this data set is much larger than what I have here. I'm having to loop through an XML file to get data and display it on a site with jQuery. I have to use jQuery because ...
5
votes
2answers
152 views

Is it advisable to integrate SQL statements in the JSP pages that are not displayed to the user but handled at the back?

I have a signup form in which the user has to enter the email address and after some quick asynchronous processing at the backend I have to tell the user that whether the email address is already ...
3
votes
1answer
68 views

.get() for multiple unique files

I'm using jQuery's .get() method to load content from external HTML files into my main index file. I created 25 different functions, function ...