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

1
vote
1answer
12 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
1answer
38 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, ...
1
vote
0answers
46 views

Interacting with database in MVC

When using MVC 4 Razor (I am new to web), I get concerned about my understanding of interactions between the database and the client. Much like all apps these days, there is a lot of data that is ...
4
votes
1answer
54 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
38 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
36 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 ...
1
vote
0answers
56 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
54 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
81 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
42 views
1
vote
0answers
101 views
2
votes
1answer
55 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
76 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
63 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
80 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
51 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
49 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
79 views

Ajax Class Efficiency

So I wrote this class to handle my ajax calls simply: ajaxCon.php: ...
6
votes
2answers
203 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
161 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
58 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
54 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
142 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
91 views

Parse needs to be more efficient

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
90 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
55 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 ...
7
votes
1answer
116 views

Requesting Resources Until Exhaustion

When an API has a 'next' feature, I use the following pattern to obtain all the results: ...
2
votes
1answer
85 views
6
votes
2answers
130 views

Is this a good way to record user response times using PHP?

I am working on a simple quiz-type game in which the user basically is asked a series of questions and needs to provide an answer. I'm trying to find a solid/robust way of recording how long it takes ...
3
votes
2answers
326 views

Is this contact form secure?

I have the following contact form, using PHP, JS and a bit of Ajax. I want to make sure that it is secure. ...
2
votes
3answers
421 views

How to improve this current contact form?

I have just started learning how to build websites, and I have been experimenting by creating a contact form. Here is what I currently have - can anyone suggest and recommend ways enhance my current ...
2
votes
1answer
70 views

Compacting jQuery Code for Framebox Plugin

I have written my first jQuery plugin for a website. It is, essentially, a Fancybox style popup that uses AJAX to load content from other pages. It's kind of a frankenstein build from multiple ...
0
votes
1answer
92 views

Different selects in one form with same name attribute?

I have the following scenario: ...
8
votes
1answer
186 views

A package for classes and Ajax

I've built a framework that primarily provides automated Ajax and a way to emulate classes. I've pasted the framework below and I hope it is well-commented. ...
3
votes
1answer
838 views

Creating <select> element and append data to it

I've made the following and have a few questions: Do I have some (big) mistakes in this approach? (bad practices, 'this code is trash'...) 1.1 If I do, can you suggest what to fix? Are appended ...
4
votes
1answer
83 views

Bringing content from other pages without refreshing the entire page

I wrote my first AJAX script that brings content from other pages without refreshing the entire page. I just want to see if improvements can be added to it, or if I'm doing something not recommended. ...
0
votes
0answers
39 views

storing the data twice on the second occasion

I use php codeigniter, jquery ajax and datatables, this image is result when first save: and this the second result when I click add button: this my code in javascript: ...
8
votes
3answers
104 views

Fail-proof AJAX

I'm working on a page using AJAX that will get an entire .php page when the navigation button is clicked. I have that set up and working right. But this is my first time using AJAX, so I'm not sure ...
6
votes
1answer
154 views

Cryptography implementation for a web-based file server

I'm not a dedicated cryptographer, so I'm looking for someone to look over these functions I wrote and let me know if there are any implementation errors leading to security vulnerabilities or just ...
4
votes
0answers
155 views

How can I optimize this query to improve performance? [closed]

I'm building a wordpress website using advanced custom fields and the repeater plugin. I've managed to put this query together after re-organizing my data using the repeater plugin. The query below ...
3
votes
1answer
213 views

jQuery plugin to ajaxify forms

This is my first foray into the wild world of jQuery plugin development. The plugin "ajaxifies" forms, which isn't particularly spectacular: It gets the basics (action, method) from the form ...
2
votes
2answers
340 views

Is this contact form safe?

Here is the code that I am using on a website's contact form: HTML file: ...
0
votes
1answer
340 views

Please check my example about jquery autocomple with servlet [closed]

Please check my code, did i get some things wrong I'm a newbie in jquery and ajax, please check and show me how to fix this In jsp page : ...
1
vote
2answers
117 views

Creating new CSS element everytime database updates

I have created a function using jQuery Ajax which create a new CSS element whenever I update the database using a form. Is it ok? If not, hat can be the best method to do it? ...
2
votes
2answers
156 views

PHP Application, attempting to restructure (Massive case/switch, ajax calls)

background A little over a year ago I was given the creative freedom to develop on the side of my primary responsibilities. I want to move into development, but am not currently in that role. I was ...
1
vote
2answers
181 views

How can I optimize my login script?

I've created an Ajax login for my website but I feel like I can optimize it, but I'm not sure how and where. Questions: How can I optimize my code? Is the code secure? Any ways to break it ...
6
votes
2answers
118 views

JavaScript file for a CMS application

Be as harsh as you can! I'm trying to improve my coding style and would like to know if there is anything I could improve. EDIT: To make this fair, The person who provides the most helpful tips (both ...
2
votes
2answers
3k views

Chat with PHP, MySql, Ajax: How to improve it?

I made this simple chat in php. You have suggestions on how I can improve it? This file configures the connection to the server This file is a simple form "login" ( only username required ) ...