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.
0
votes
0answers
38 views
Zend Framework 3 Ajax Form Validation - contact form
I would like to present to you my code vision of Ajax form validation in Zend Framework 3. I am a beginner in Zend Framework and jQuery too, so I don't know that my solution is good and acceptable.
...
0
votes
1answer
77 views
Simple JavaScript quiz app using an external questions.json file
I have a quiz app that gets data from a questions.json file using AJAX, loads them into my script file, and then use Handlebars to compile templates so I don't have ...
1
vote
0answers
20 views
Simple XmlHttpRequest to be used with web workers
I have a very basic XMLHttpRequest function that would be used with web workers.
I would like to know how I could improve it to handle possible errors better:
...
3
votes
1answer
30 views
Take a search term and return a list of location from an API
I've just refactored some code for a search box which takes a user search term, hits an API, returns a list of possible locations, and processes the users chosen result by sending them to a map page ...
3
votes
0answers
70 views
ASP.NET MVC - server-side Ajax result conversion
I am currently in the process of creating a website which requires it to work with and without JavaScript enabled. All callbacks to the server with JavaScript enabled will be made through Ajax ...
1
vote
2answers
22 views
Updating a Drupal web page with content based on inputted text
The intent is to update an existing Drupal web page with content based on text entered into a textbox.
The existing page displays data from a database in a table. This code gets JSON formatted data, ...
2
votes
1answer
58 views
Synchronising data with AJAX calls
I'm developing a mobile app with Cordova, jQuery and jQuery mobile. To synchronise the data saved on a device I make AJAX calls to a server (I'm sending and ...
2
votes
1answer
68 views
Registration form validation in jQuery
I have created a registration form using jQuery. I am validating username and password using an AJAX request. The "submit" button is originally disabled and is only enabled when all three fields of ...
0
votes
1answer
56 views
JavaScript multiple ajax calls but can either be one or two
I'm writing a piece of JavaScript to make one or two ajax calls. There will always be one ajax call fired but it might be two based on cookie setting. If user is logged in then we call another service ...
1
vote
2answers
82 views
3
votes
0answers
76 views
React component to list TV shows from a JSON result
I'm trying to rewrite my old project in Reactjs. As I am a beginner and this is my first app, I need some assistance in understanding what is the best way to do this in the React way and how I can ...
2
votes
1answer
63 views
File extension detection and restriction on upload
I am trying to build a multiple file uploader with jQuery and Ajax. I would like to know how this code could be improved. I feel the client side validation of file types in my code are presently not ...
1
vote
1answer
89 views
Load page content on hashchange
I want to create a modular website with no frameworks or CMS nor server-side language.
Also, I am doing simple use of the hashchange event to help the navigation.
The structure would be as follows:
...
1
vote
0answers
31 views
AJAX Form Creator
I wrote an AJAX Form Creator (in the form of an js object constructor) that takes a form and a callback. I am a decent, slightly okay, completely novice developer, and could use feedback on coding ...
5
votes
1answer
311 views
Random quote generator from API
I have built a random machine generator website. It fetches the quotes from forismatic and has a button to get a new quote. When it gets a new quote, the website color changes. It also features a ...
0
votes
0answers
190 views
Polymer decorator to make iron-forms actually work
I just finished writing a first version of hot-form. It's a simple decorator that makes iron-forms do I basically always do:
Show error messages, or a custom ...
7
votes
1answer
148 views
Make Simultaneous HTTP Requests That Resolve Into a Single Return
This week, in an ongoing job search, I was tasked with the following pre-screening question:
Make two simultaneous http requests. Use the language and library of your choice. Make sure the results ...
7
votes
2answers
146 views
Simple inbox functionality using JavaScript and Ajax
I've been developing a simple CMS both for practical use and learning about Laravel, and I decided to implement a simple service that makes it possible for the administrators to send messages to one ...
0
votes
1answer
42 views
Accessing Models Directly Through AJAX [closed]
I was thinking about how to handle AJAX requests in a MVC environment in PHP in a easy way.
What I've come up is (without showing you the backend code):
...
3
votes
1answer
73 views
PHP & AJAX CAESAR CIPHER ENCRYPTED chat script - Slow in performance
I have made an attempt to make a chat script and its working as required but the problem is that it is slow on slower connections and sometimes even on fast connections. Sometimes while loading the ...
4
votes
0answers
98 views
Colour-matching game
This is a game about matching the right colour. In the first level you start with 3 cubes that each have a different colour. After 2 seconds the colours of the cubes disappear and the cubes become ...
1
vote
1answer
67 views
Loading an animation with an Ajax request
I am not sure if this is the correct way to make an Ajax request and do the typical loading/processing GIF/animation while processing is happening and displaying the response.
HTML:
...
0
votes
0answers
205 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 ...
2
votes
1answer
69 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
283 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
33 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
68 views
2
votes
0answers
31 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
326 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
45 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
935 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
58 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 ...
2
votes
0answers
52 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
85 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
17 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
40 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
61 views
Controller for a vehicle servicing AJAX app
I am working on a codebase that operates in the following manner:
...
3
votes
2answers
242 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
409 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
164 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
36 views
Three identical AJAX button handlers in three views
In my Rails 4 app I have this event listener:
...
0
votes
1answer
87 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
81 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
61 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
47 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
91 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
65 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
394 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 ...
3
votes
1answer
56 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 ...