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
46 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
37 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
69 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
52 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
64 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
71 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
41 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
110 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
59 views
6
votes
2answers
102 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
194 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
250 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
52 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
70 views

Different selects in one form with same name attribute?

I have the following scenario: ...
8
votes
1answer
179 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
303 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
74 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
34 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
91 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
133 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
144 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
132 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
243 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
235 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
107 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
136 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
143 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
117 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
2k 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 ) ...
3
votes
1answer
631 views

Is this simple AJAX login/register script sufficient?

I'm using Twitter Bootstrap. I haven't coded anything significant web design related in a while, because I've been doing desktop stuff and games. I'm trying to get back into the flow of things. Can ...
2
votes
1answer
308 views

Code to update content via ajax

Following is the code to update content via ajax. Please review all aspects of the code. ...
2
votes
1answer
131 views

DOM cloning in a loop

I'm cloning a fairly complex div/ page and changing various things in it before appending it to the DOM. The current method seems long-winded, and I was hoping if there was a simpler way of doing it? ...
1
vote
1answer
77 views

Simplifying an ajax script in my HTML

I'm using Twitter Bootstrap and I'm working on a page that has several tabs that all have carousels in them (each with a ton of images) I've managed to write an AJAX script that pulls the images from ...
1
vote
0answers
76 views

Improve AJAX response handling function

This code handles a response from an RSS feed. It organizes and appends to content. If there's a video embeded then separate it from the rest of the content. I would like a review mainly on ...
3
votes
2answers
926 views

Implementing a cross-browser AJAX utility as an exercise

I am currently learning JavaScript and created this cross-browser AJAX utility as a learning exercise. It was not meant to be used in production code, and I just tried to cover only the cases that I'm ...
2
votes
1answer
269 views

How should I re-factor this code?

In my system there are 3 main functionalists. Add users to database Delete users from database Updater users This is the screenshot in my UI When clicking on the button of add new user, ...
3
votes
2answers
123 views

Querying a database with PHP

I'm new to PHP programming. I would love some feedback on this simple code I wrote which queries a database based on some arguments supplied by a user and returns an HTML table displaying the data. ...
5
votes
3answers
248 views

How to structure a Javascript module better?

There's this Ajax-heavy, JQuery-based site which I'm about to work on. There hasn't been much structure in the JS code so far (lots of functions at global scope, hard-coded in the HTML ...
1
vote
0answers
210 views

jQuery/AJAX Plugin for WordPress and Foundation Reveal: How can I improve this code?

I figure that someone here probably knows a much better way to do this. I'm still figuring out AJAX and jQuery, so I consider that I still need to master quite a bit of knowledge. My function ...
3
votes
1answer
128 views

Managing debit/credit accounts

I just want to know if there room for improvement or something I should redo to be better. Sorry for my lack of notes. ...
3
votes
1answer
406 views

Using AJAX to interact with MVC

I have the following ajax call: ...
2
votes
0answers
345 views

Multi-page form with each step loaded via Ajax - is this good rails code?

RoR beginner alert. I've building a multi-step form that saves data in multiple models. The "base" or parent model is the Venue, and *has_one* or *has_many* other models. In the screen below, the ...
1
vote
1answer
98 views

Cache mechanism with duration

I want to implement in my code a cache mechanism with a fixed duration. For example an iframe will be cached for one hour, or a script file will be cached for 24 hours. This is how I implemented it, ...
3
votes
1answer
181 views

JQuery code repetition and MVC

A while ago I started working on a project, which does things mostly with JQuery and PHP. I had some problems with my structure and started using CodeIgniter which uses an MVC pattern. So the PHP part ...
1
vote
1answer
94 views

my first jquery/json

This is my first use of jquery and json so would be grateful for any feedback please. Background - this is on a job listing site and it has a Linkedin apply button plugin - this provides for a ...
2
votes
2answers
1k views

Best way to structure PHP AJAX handlers?

I'm just getting started with AJAX and am unsure of the best way to structure a PHP AJAX handler. I created a PHP file, ajax_handler.php, and the way I have it ...
2
votes
1answer
4k views

My login with AJAX and PHP

In your opinion, do I need to do all these validations. I thought to do well and stay safe but I seriously raises the question if it isn't slower. jQuery code ...
-1
votes
1answer
243 views

ASP.NET MVC 4 Shopping Cart - Cannot update shopping car items using JQuery , Ajax, jSON, jGrid [closed]

I have this code in a C# MVC 4 VS2012 project. I need to be able to update the shopping cart with jSON data using JQuery/AJAX, i'm using jqGrid to display the data and pulling the shopping cart items ...
1
vote
2answers
4k views

Using AJAX to look up MySQL value using two dropdown inputs

I have a list of cities, and a set of "travel time" between any given two cities. The "travel time" is fixed and not necessarily dependent on absolute distance between the two cities, and it currently ...
9
votes
2answers
743 views

Display progress bar to show async. request status using JQuery

Instead of using ProgressBar plugin, I've below script to display the progress bar for async. requests on the page. Could anyone provide any feedback on this esp. if there will be any issues like ...