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.
1
vote
0answers
27 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
99 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
30 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
111 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
92 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
41 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
39 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
74 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
47 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
76 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
54 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
190 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
28 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
55 views
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
183 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
44 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
336 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 ...
2
votes
0answers
47 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
76 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
16 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
58 views
Controller for a vehicle servicing AJAX app
I am working on a codebase that operates in the following manner:
...
3
votes
2answers
153 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
162 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
124 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
75 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
78 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
48 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
42 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
81 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
59 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
248 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
14 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
54 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
48 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
35 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
60 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
60 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
97 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
334 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
83 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
139 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
18 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
76 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
38 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 ...