AJAX (Asynchronous Javascript And XML) is a popular technique for creating interactive websites, allowing web content to be updated asynchronously by exchanging small amounts of data with the server behind the scenes.

learn more… | top users | synonyms

0
votes
0answers
13 views

Php Ajax script to check server status of sites from db

I am writing a script for a client so hey can check the status of their servers. The script performs ajax requests to get the data as json then poulates the table with the returned json results. is ...
1
vote
1answer
40 views

Cross browser JavaScript implementation of xhr

I wrote a small, cross browser compliant implementation of xhr requests in client JavaScript that closely follows the jQuery $.ajax() API and standards. The goal is ...
2
votes
1answer
130 views

Session expiration handler using PHP and jQuery

At this point i am interested to see other techniques on handling session timeouts. What are some good improvements on this script to detect when a session is no longer valid? Important definitions: ...
1
vote
1answer
23 views

Making a news widget webpage

I have finished the assignment but would love some feedback. Data.json contains news articles data. Requirements for assignment: Fetch the data and render it on the page. Initially the page ...
0
votes
1answer
53 views

Submitting a form via JSON

I have a feedback.js that I would like to improve. ...
2
votes
0answers
28 views

JavaScript AJAX page flipper

I rarely see this kind of navigating on the web. But basically I load all the content in the background and then flip pages as needed while loading user specific data via ajax. Are there any ...
0
votes
1answer
83 views

Wikipedia search using the JSON API

I ask to you. What I could do better in my code or logic? This my example on Codepen -> Wikipedia Search ...
3
votes
1answer
43 views

Place Ajax request on completion of Ajax Request

I have an Ajax request which in turn on completion make another ajax request. Is this good? How can it be improved? ...
4
votes
3answers
161 views

A reusable AJAX polling function

I have written a small JavaScript function which performs an AJAX request every x seconds. I was hoping some of you could give it a look over and give me any pointers on redundant code or bad ...
6
votes
3answers
57 views

Navigation script and template

Overview: I'm using the following page template and scripts for navigation. I use a single page that loads menus and context content, and then use ajax or GET variable to load main-div's content, by ...
4
votes
0answers
147 views

Ajax bootstrap modal form function

I made a few functions to handle an Ajax post request for a form inside a bootstrap modal, and then update the form errors / display a success message disappearing with a timer countdown upon valid ...
3
votes
0answers
41 views

Ajax login response [closed]

I want to create an Ajax-Login, but I'm not sure if my solutions is generally correct. I want to do everything correct, so I need someone who checks this code and give me some improvement hints. ...
2
votes
2answers
68 views

JavaScript Payload

I am coding a proof of concept on the danger of JavaScript poisoning, XSS and other client side attacks. Therefore, I coded some JavaScript payloads. As I am not very familiar with JavaScript (I ...
0
votes
0answers
25 views

Extracting articles mentioned in comments in three GET requests

I need to make several HTTP GET requests and do the following stuff: When all of them will be completed, I need to parse each HTML After HTML parsing or in case of any error I need to set flag ...
0
votes
0answers
15 views

Processing the results of several GET requests via jQuery

I need to make several HTTP GET requests and do the following stuff: When all of them will be completed, I need to parse each HTML After HTML parsing or in case of any error I need to set flag ...
1
vote
1answer
38 views

Displaying available destinations using Angular.JS

I wonder to know if there is any bad smell on my practice for i18n on Angular. I put the I18n translating function on Angular controller (because I don't know how to put it on HTML template file) And ...
4
votes
1answer
57 views

Controller for a vehicle servicing AJAX app

I am working on a codebase that operates in the following manner: ...
3
votes
2answers
112 views

Large table updates using AJAX in Internet Explorer 11

I have a website which only needs to support IE11. It is a single page application, which has about 200 table rows and each table row has 5 child rows. There is a pulsing function that updates the ...
0
votes
1answer
65 views

Creating a wrapper function for jQuery ajax

I am creating a few functions that wrap around jQuery's ajax function to make it a bit quicker and easier to preform a request. For this I have this JavaScript file: ...
0
votes
1answer
99 views

Functional Javascript Practice with AJAX

I am currently doing projects in freecodecamp.com to brush up on my javascript skills and just finished a weather report widget. It does the following: Gets api ...
4
votes
1answer
34 views

Three identical AJAX button handlers in three views

In my Rails 4 app I have this event listener: ...
0
votes
1answer
67 views

HTML template for win-loss data in Javascript with Mustache

Can anyone suggest a better way to implement my template code? ...
2
votes
1answer
73 views

Creating a login page

I have created a test login page that, as most do, takes in two values from the user (username and password) and the processes it. For this I have opted to use jQuery and AJAX to pass the results to ...
0
votes
2answers
39 views

Ajax request URL

So I am making a HTTP request with the google maps API & I have to pass in parameters (Addresses/coordinates) The way am doing it right now looks like this. ...
5
votes
1answer
39 views

PHP Image Uploader

I have a website, where one of the options that a user gets is to change their avatar. I would like to know if there is anything that I shouldn't or should be doing... So here is what I've got. Here ...
8
votes
1answer
76 views

Populating many fields in a form using jQuery/AJAX

I have the following code which sets input values using jQuery/AJAX. Can the repetition of the code be shortened in anyway? It's mainly the AJAX requests I'd like shortened. It doesn't seem right to ...
2
votes
1answer
56 views

PHP passing messages back to Ajax

I have removed a lot of the code, but you should get an idea of what I am doing: ...
3
votes
1answer
144 views

Updating state with React

I am creating a blog using React, MongoDB, Express and Node. I have three components: App, List, and Item. The item is a blog post; the list is a list of the blog posts, and the app includes a place ...
0
votes
0answers
13 views

Update database, refresh page, and show success message

I am trying to update a database after I have made changes. Basically I want to update the database based on the changes made, refresh page, and show a success message. This is what I have: ...
3
votes
1answer
53 views

JavaScript ajax formquestion editor

This is the JavaScript file that i use for my editor that allows people to edit questions from a form. I'm wondering if this sort of approach to use JavaScript objects is good or that I kind of miss ...
0
votes
1answer
32 views

Identical jQuery autocomplete handlers for two form fields

I do need to use jquery autocomplete for two inputs. But I have use same processing script for these two elements. At this stage I am doing it like this. ...
2
votes
1answer
33 views

A first AJAX search page

This is the first AJAX website I constructed. I am trying to have information generated according to the name that user types in. It works well but I have some problem with the slow performance. Is ...
1
vote
0answers
53 views

Hopefully secure post love counter

Is my nonce implementation secure? I'm trying to learn security on wordpress->ajax (and later woocommerce) and with wp_create_nonce. After much struggling I managed ...
3
votes
1answer
59 views

jQuery AJAX requests - Plugin to Backoff on failure

I'm brand new here, but I've read the guidelines and looked at some up-voted questions. Hopefully I understand how I'm supposed to do this... if not, please let me know and I'll fix my question. ...
5
votes
2answers
95 views

Writing a thin navigation controller

I'm trying to achieve a thin controller, and I started out with a thin controller but over time as the project has progressed the controller has got more complex. Could you please review the following ...
3
votes
2answers
310 views

Show list of states depending on user selection

I have some data that needs to bind to my view depending on the user selection. Example: changing the list of states in a dropdown depending on the selected country. My understanding is, there are ...
3
votes
2answers
82 views

Present waitlist dialog box if placement is full

I wrote an ugly mess of a JavaScript function that pops up a dialog box based on validation data, when a checkbox is clicked. I am wondering if it can be refactored somehow. ...
4
votes
2answers
109 views

Lorem ipsum chat bot

I'm a web development student, and I made a chat bot that emulates an SMS app commonly found on smartphones, etc. It responds with random lorem ipsum text. I'm wondering if my functions are too long ...
0
votes
0answers
17 views

Angular controller to fetch information on conractors [sic] and projects

In my Angular controller, I am using 3 different functions to get the data. It works fine, but is there a way to simplify this? ...
1
vote
2answers
64 views

Getting paginated data from ajax call and putting the data on the page

At the moment, it gets the first page worth of data and then each subsequent page when the user scrolls down to the bottom of the page. My JavaScript/jQuery level is fairly weak, however I have ...
3
votes
0answers
37 views

Search Class with Static Methods

Most of my programming experience is in PHP, and I have always been a bit wary of JavaScript. I have a JavaScript class to manage executing, caching and displaying search results. ...
5
votes
1answer
158 views

Deleting a section of a website using Ajax

I am currently writing a decent amount of ajax to help me delete a section of a website. It's already becoming a pretty big piece of code, I wondered if it were possible to compact a section of my ...
2
votes
2answers
503 views

Combining data from two AJAX requests

I have two jQuery Ajax callbacks in succession, to fetch two sets of data from two different URLs, before combining them. ...
3
votes
1answer
337 views

One-time secret message application using PHP-encryption library

By utilizing an existing PHP encryption library (defuse/php-encryption) and a flat file database library (jamesmoss/flywheel), my application take a secret message from a user, encrypts it using a key ...
5
votes
1answer
127 views

JavaScript API for REST

I have a REST API, which naturally you can just use HTTP calls (mainly Ajax) in order to send and receive data. I am building a layer of abstraction on top of the raw REST API for JavaScript ...
4
votes
1answer
53 views

Storing get call data on same function

I basically have a folder view structure, that each time I call grabs the value of the selected field and gets that specific folder data. I was wondering if there's a better way to do this by caching ...
2
votes
1answer
429 views

Autocomplete search or instant search script for shopify

I have developed a simple autocomplete module for search box in ecommerce website (http://www.cjcharles.com/) built over shopify. Now, as the CMS is commercial, I was forced to use its given API's ...
2
votes
1answer
50 views

Remote control: receiving the command

I want to create a web app that should let users remotely make a device do a variety of things simply using any other device, anywhere, without installing anything. To do that, the device which ...
4
votes
1answer
100 views

Database syncing playback of videos

I made a website last night that allows people to sync HTML5 <video>s (playing/pausing). The way it does this is by using Ajax to run a MySQL query every 2 ...
4
votes
1answer
249 views

Sending Ajax requests and updating DOM

I wrote some ugly JavaScript that is responsible for sending Ajax requests and update the DOM. I'm using it to show user progress of background jobs. ...