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.
-2
votes
1answer
27 views
Is it possible to group these 2 functions in one? [on hold]
Hi I need help to group these 2 functions in a single function. I use them to populate data in 2 tables simultaneously with ...
-2
votes
0answers
23 views
Load more data on Button Click [closed]
I want to get more 6 data on button click through ajax call from database in MVC 4.
My Controller
...
3
votes
1answer
50 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
91 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
87 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
71 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
82 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
15 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
43 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
31 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
156 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
128 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
157 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 ...
3
votes
0answers
87 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
48 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
163 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
47 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
53 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
240 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
43 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
169 views
7
votes
2answers
1k 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
57 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
77 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
83 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
19 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
40 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
183 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
50 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
91 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
56 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
57 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
123 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 ...
2
votes
1answer
152 views
My AJAX LiveDate Object
The LiveDate object displays the live current date and has a sendAjaxRequest() function dependency to send the AJAX requests.
...
3
votes
0answers
92 views
Ajax file uploader jQuery plugin
I tried to write my first jQuery plugin. It's a very simple Ajax file uploader.
I would appreciate a review of this code.
HTML
...
3
votes
1answer
161 views
React Flux structure for a shopping app
we have just started up a new app and we are using React with the Flux architecture, we have done our best to piece together what we think is the best structure for the app and would appreciate any ...
1
vote
1answer
153 views
Return fake jqXHR from custom Ajax method
I have several methods that wrap the $.ajax() method and return its jqXHR, but I need to force fail before even calling the original ...
1
vote
1answer
356 views
Rewriting this function to use `promises` instead of `async: false`
Using parse.com's javascript API, I would like to get a variable number or images from img tags on a page and save those images in the currently logged in user's ...
0
votes
0answers
125 views
Make knockoutjs model simpler and avoid full observable array refresh
The form creates / updates /deletes a category. The category is simple: ID and name properties in backend (Laravel) model.
UI:
Clicking on a category enables "edit mode":
I need 2 things here:
...
3
votes
0answers
284 views
Laravel controller for a commenting system
Can someone review my Controller? I should follow these guidelines:
Code should be written with MVC pattern and to use OOP.
The code now works fine, but I need to improve it. Also, should I use ...
0
votes
1answer
86 views
All-purposes AJAX handler made with PHP and .htaccess that speaks JSON - Part 2
Earlier, I've posted a question about a file used to handle AJAX requests.
I've followed some of the advices given and made some changes on the code itself.
You can go on "All-purposes AJAX handler ...
0
votes
2answers
191 views
All-purposes AJAX handler made with PHP and .htaccess that speaks JSON
In a project I've started, I decided to implement some new code to handle AJAX requests.
The requirements are that it can ONLY access the /ajax/ folder, load ...
3
votes
2answers
197 views
Is my login system secure?
I am recently making a CMS and I need a secure login system, so this is my code. How is it?
First: the HTMLcode for signup and login:
...
1
vote
2answers
128 views
Alternate for nested Ajax requests
I have one button on clicking I need multiple things need to be done, so I went for AJAX and PHP:
...
0
votes
0answers
303 views
Using CasperJS to fetch and fill option values
I use the following CasperJS code to fetch data from an ASPX page with combo drop down box, which option values are dynamically populated via __doPostBack().
the ...
2
votes
0answers
126 views
Creating chat box with comet
I'm writing chat application. I would like to know if there are problems in this code.
This function sends message:
...
2
votes
1answer
130 views
AJAX call with repetitive success/failure handlers
There's some repetition in here. I tried making it into a function but then the response wasn't filling up the ...
4
votes
1answer
215 views
Removing popup notification, the dirty way
I'm new to coding and I am self-taught up to this point, so my scope for creativity is quite limited. As such I'm doing something in particular that I suspect isn't the "best" way of achieving this ...
3
votes
2answers
178 views
iPhone notes application replica using HTML/CSS
I've written a web application that is a replica of the iPhone's notes app. It turned out quite well, you can do everything you can on the iPhone's app except for sharing and sending it via texts etc. ...
4
votes
1answer
236 views
PHP & AJAX live chat - alternative ways
I am trying to implement a live chat for my websites visitors. Currently I am using the code that you can see below - a PHP script that processes in background and that is called by AJAX. I am not ...