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

-1
votes
0answers
9 views

upadte attribute of one panel id of Composite component .in another xhtml JSF2.2 [on hold]

Test1.xhtml.. I want to use one panel id=d from the composite component on selecting a dropdown value in another (test2.xhtml).I am new to jsf2.2 and struggling to implement my logic with custom ...
-5
votes
1answer
24 views

Would someone please see if I did Jquery right? [on hold]

Something in my script is causing to reload the page and inserting all my <head></head> contents below my ...
3
votes
2answers
66 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
31 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: ...
-3
votes
0answers
20 views

Angular creating a directive on the fly and limiting its scope data [closed]

I am having a go with angular. I have been reading up on $broadcast and how to create a directive on the fly. Basically the issue I am having is how to pass the data from the server to an ...
0
votes
1answer
39 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
31 views

Three identical AJAX button handlers in three views

In my Rails 4 app I have this event listener: ...
0
votes
1answer
47 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
59 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
29 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
33 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
68 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
50 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
64 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
11 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
49 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
15 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
32 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
38 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
57 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
92 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
197 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
78 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. ...
5
votes
2answers
97 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
53 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
36 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
157 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
298 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
236 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
113 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
51 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
265 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
79 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
242 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. ...
1
vote
1answer
63 views

Form validation

I want to know if this would be considered a proper way to validate a form or if there is an easier way that I'm not aware of. I think I was reading somewhere that you are not supposed to use ...
1
vote
4answers
364 views
7
votes
2answers
2k views

Securing PHP shopping cart

I've managed to create a working shopping cart and my next concern is security, mostly about the architecture and session security. Should I make sessions somehow secure, if there's no authenticated ...
3
votes
1answer
63 views

Simple AJAX script calling a number

I wanted to create a basic interaction which does 1 outcome but with 2 possible actions: get a number from an other document, by either clicking on a button or waiting a fixed amount of time. I wrote ...
1
vote
1answer
84 views

Adapting new design pattern with post handler

I'm currently using this pattern in my JavaScript code. Somewhere in my code I use Dnianas.Post.init. init fires and it will ...
3
votes
1answer
111 views

Handling a double click issue

I've been doing a lot of form submission using Ajax now and being used to it than having a normal submission. What's been troubling me is that I always ran with a double submission issue when the user ...
0
votes
0answers
21 views

Execute GeoDjango query from multiple rows of data and read it using AJAX

I used AJAX to read the result of my query: ...
3
votes
1answer
59 views

AJAX error function using a constant

I have the following ajax call and if it errors, I have a default error message stored in a constant which I'll use if the response doesn't contain a custom message. When I look at this, I keep ...
6
votes
1answer
194 views

LiveDate version 2

LiveDate has the ability to display the current date either by asynchronously fetching the time from a server or by just using the client system date. It's only as ...
0
votes
0answers
54 views

Building JSON array containing HTML

So, One of my companies developers wrote this. Not me. Alright, it was me. How can improve this puke? ...
1
vote
1answer
108 views

Simple AJAX library in JavaScript

I've created two simple methods: one to instantiate a new XMLHttpRequest object and open the request and another to handle the request. Can you please point out ...
2
votes
1answer
60 views

Class that make asynchronous http requests

I made this function to act sort of like jQuery's $.ajax. I intend to use it in small projects where I do not use jQuery (I don't want to load a whole framework ...
0
votes
0answers
65 views

Implementing Ajax deferred/promise patterns

I have a testcase where I want to send a request to the server every time a form field change event occurs. The implementation below works as expected until I ...
0
votes
1answer
149 views

Ajax Done Callback to prevent requests from interrupting each other

I am trying to make sure my Ajax does not send another request before it receives a reply. To the best of my knowledge the code I will post is supposed to do this but I am still getting a -1 for ...