Skip to main content

Questions tagged [ajax]

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.

Filter by
Sorted by
Tagged with
2 votes
1 answer
234 views

I really don't post a lot on here, but decided to share this because I thought first that it could be helpful and second that it could be improved. In my first versions, It was all javascript, like ...
Charles G's user avatar
  • 103
3 votes
1 answer
236 views

I am working on a blogging application in Laravel 8. I have put together a way to preview and remove the main article image. In the ArticleController.php controller,...
Razvan Zamfir's user avatar
0 votes
2 answers
211 views

Code below successfully processes and submits data to database. Is there anything else that needs to be included / considered? PHP (note-process.php): ...
Matt's user avatar
  • 9
1 vote
1 answer
74 views

I have a HTML form that allows users to filter their choices when browsing. There are multiple fields (radio button groups) that when the user clicks on them, the search results are updated ...
bertster's user avatar
  • 113
0 votes
1 answer
109 views

I am using AJAX script to fetch data from a database. For example, it has Motorola Samsung Apple as company and I use AJAX to fetch models of it, so that when Apple is selected then it shows Apple ...
Ruchika's user avatar
  • 103
0 votes
1 answer
93 views

Am using AJAX script to have data fetched from database. For example has Motorola Samsung Apple as company and using AJAX to fetch models of it. Like when apple is selected then it shows apple iPhone ...
Ruchika's user avatar
  • 103
3 votes
1 answer
578 views

I wrote some code that will get the name and data of a node or multiple of nodes and put them in an object (seriesData) so I can use said object for a chart (renderChart). I used setTimeout() so ...
Bewarden's user avatar
1 vote
2 answers
5k views

As an exercise, I found a basic way of updating pages without refreshing, partially mimicking the behaviour of SPAs and routing libraries such as React Router. I was not looking for something as ...
Ichi's user avatar
  • 93
1 vote
1 answer
323 views

This is the first ever bit of front-end code I have ever written, I have tried to adapt the existing call that is there to the backend using axios, so I check on of the response object value using the ...
mp252's user avatar
  • 507
3 votes
0 answers
292 views

Random Astronomy Photo About the project This is a React app that generates a random photo from NASA's Astronomy Picture of the Day (APOD) API along with some interesting facts about it. This is my ...
jennsparkles's user avatar
0 votes
1 answer
184 views

I have a simple website contact form created back in 2017. The form was developed using PHP, PHPMailer, jQuery, HTML and CSS. I would like to make sure the code is up to modern standards and secure. I ...
Michael Benjamin's user avatar
4 votes
2 answers
3k views

I need to fetch some data from a mysql database. For that I created get_data.php on the server and a js function to retrieve that data on the client. Is this the proper way to do it? What would you ...
Graziano Bolla's user avatar
1 vote
0 answers
110 views

My intention is to create an API as generic and DRY as possible using Go. To achieve this, I have made some more or less common decisions: To use AJAX call to avoid reloading page when updating the ...
sibert's user avatar
  • 119
3 votes
2 answers
351 views

I have been working on an online newspaper/blogging application with CodeIgniter 3.1.8 and Twitter Bootstrap 4. The latest feature added is lazy loading of posts. From the Static_model (...
Razvan Zamfir's user avatar
2 votes
2 answers
116 views

I've built a very simple personal website, everything is in a single file because it is very straightforward, but I think the JS script could be better structured. All it does is fetch some repos from ...
MauricioRobayo's user avatar
4 votes
2 answers
5k views

I am working on a Laravel application (Github repo) that requires user registration and login. After registration, the users can change their registration details (except password, for which there is ...
Razvan Zamfir's user avatar
1 vote
1 answer
96 views

I've built a login panel, which will submit an email and password via fetch/POST. And I wanted to know the best way to handle network status errors? Reason being, as I want to inject error messages ...
Reena Verma's user avatar
2 votes
1 answer
742 views

I am working on a online newspaper/blogging application with CodeIgniter 3.1.8 and Twig. The application is meant to offer developers and designers the possibility to very easily turn their HTML ...
Razvan Zamfir's user avatar
3 votes
2 answers
108 views

Apologies in advance for my english... We have a list of categories and a list of doctors, you need to output as follows: category1 item1 item2 item3 category2 item1 item2 item3 Here is what I ...
Denis Novac novak's user avatar
3 votes
2 answers
360 views

I am working on an online newspaper/blogging application with CodeIgniter 3.1.8 and Twig. I use the Twig template engine for the front-end views. I have put together this simple contact form which ...
Razvan Zamfir's user avatar
3 votes
1 answer
957 views

Finally after a few months of searching and learning AJAX with pagination PHP and History.pushState() I created AJAX PHP pagination. Test page 1. Ajax(index.php) ...
Mantykora 7's user avatar
2 votes
1 answer
63 views

I recently started a project which has a database of rail cars for a train simulator. Im trying to set up a way to filter the data based upon 4 categories "Car Type", "Road Name", &...
David's user avatar
  • 121
5 votes
1 answer
817 views

I am new to node.js, ajax, and asynchronous code. I’ve pieced together a working way to exchange json between browser and server and am wondering if someone with more experience considers the approach ...
Jim Thompson's user avatar
1 vote
2 answers
233 views

I want to get my code cleaner and more efficient. This code gets variables form a PHP file and filters it to show the selected user name, all available usergroups on a list box and the groups he is ...
davidsi02's user avatar
  • 231
4 votes
2 answers
162 views

I want to get my code cleanner and more efficient. This code gets variables form a PHP file and filters it to show the selected user name, all available usergroups on a list box and the groups he is ...
davidsi02's user avatar
  • 231
4 votes
1 answer
61 views

I am trying to render in a leaflet map that should render a single marker. I am building the JavaScript as follows. build the map an even listener for when the user opens the page where the map is ...
user avatar
1 vote
2 answers
254 views

I have small question. I don't know much about JavaScript (jQuery) or AJAX and I don't know whether I'm doing it safe from XSS Attacks, SQL injection and that stuff. I think the PHP with MySQL would ...
Tomáš Kretek's user avatar
3 votes
0 answers
458 views

I'm trying to create a dependent dynamic dropdown in jQuery, in which the number of dropdowns is not fixed. Let's say we've four provinces, each has cities, and each city has sections. Each section ...
Zahra Hnn's user avatar
3 votes
2 answers
693 views

Is the method used below to get data from a database efficient and optimal? The data is in a MySQL database, and in my server I have a PHP file with the following code to return some information: <...
Riccardo Perego's user avatar
2 votes
2 answers
431 views

I've been working with JavaScript and AJAX a lot in the past, and now I'm moving towards the backend and working with databases more. I want to update my game data in as close to real-time as possible ...
Elijah Mock's user avatar
1 vote
1 answer
2k views

After a few weeks of searching and learning ajax, pagination php, product filter, I created ajax php product filter with pagination. 1. index.php ...
Mantykora 7's user avatar
7 votes
2 answers
251 views

With much of the world in lockdown at the moment, my friends and I wanted a way to play our favourite game, Celebrity, over video chat. This seemed like a fun coding project, so I put together a ...
OpenSauce's user avatar
  • 218
1 vote
1 answer
2k views

I am writing a script that is supposed to retrieve some data from a MYSQL database but I need to make it happen live and after lots of research I learned that this thing can be done using something ...
Nyx's user avatar
  • 113
1 vote
1 answer
224 views

I'm learning AJAX JSON. I'm just testing how to pull the data. The idea is, when hovering over the number, it pulls the data and show the content for name and email. Number 1 is to show name and ...
Udzzzz's user avatar
  • 11
3 votes
2 answers
151 views

Here is my parent component: App.vue. I was wondering what improvements I could make to the code here. Application Description This application was built off the Vue.js framework and utilizes a ...
Harrison Greeves's user avatar
2 votes
1 answer
593 views

This is working code for input KML files into leaflet map ...
Geographos's user avatar
4 votes
2 answers
230 views

I'm looking for a good approach to AJAX communication using only pure JS and PHP. I would like it to be as safe as possible and compatible with most modern browsers and IE 10+. I did some research and ...
Susan_8940's user avatar
2 votes
0 answers
2k views

here is a code of a simple contact form that I have created, I believe that the form is server-side protected against empty fields, header injections, CSRF, XSS, bots using 'Google reCAPTCHA v3' and ...
Mozes22's user avatar
  • 121
8 votes
2 answers
374 views

I'd be grateful for a review of my AJAX request. If I have taken the correct approach here and especially any security concerns! I am creating a Purchase Order system for my manager (as part of an ...
gclark18's user avatar
  • 201
3 votes
1 answer
109 views

I have Ajax function with a callback which fetches all the Patient data however I have some perfomance issues and trying to figure out what it might be, does anyone have idea? That's my Code ...
Mike J's user avatar
  • 33
2 votes
1 answer
80 views

I need some suggestions on how to approach this. I want to allow users to create sections of website. The code so far is working but since I am new to back-end I feel like there is better, more ...
Iskren's user avatar
  • 21
3 votes
0 answers
313 views

I am learning to use the new API version of Paypal, and I have some doubts. Note: I've tried this on https://www.sandbox.paypal.com and it works, I have not done the tests on Live. onApprove: I ...
Learning and sharing's user avatar
4 votes
1 answer
182 views

I'm looking for specific feedback on a major design change that I plan on making to my personal website (https://aleksandrhovhannisyan.github.io/). Currently, the Projects section contains hardcoded ...
Aleksandr Hovhannisyan's user avatar
3 votes
2 answers
183 views

I build a cart for an ecommerce website, and I want to know if I did well. I want to record the changes in the DB and display the information from the DB to the customer. To be sure that what he sees ...
adamanyn's user avatar
1 vote
1 answer
72 views

I need to fetch data from an server that isn't always reliable and unfortunately fixing that is out of my hands. My team determined we would attempt the request up to 3 times. So I thought of using a ...
neerengi's user avatar
0 votes
2 answers
2k views

The following code works fine. When a user clicks on an element, an AJAX request is made, which will return the query result. The results are being displayed in a view. I read many articles where ...
Abdullah Faraz's user avatar
2 votes
1 answer
450 views

How can I pass data from database to my HTML template without putting PHP code in my HTML file. Thanks. This is my controller ...
jaybee satulan's user avatar
2 votes
0 answers
131 views

I wrote a piece of code that included multiple AJAX requests and multiple SetTimeout animations. I want the code to perform better, especially the SetTimeout sections. which part of the code should ...
Phoenix's user avatar
  • 81
1 vote
1 answer
674 views

People here often ask to share as much code as possible. My app is just a sandbox, a typical freshly created AspNetCore + Angular template without much code. So please don't blame me - I provide ALL ...
Alex Herman's user avatar
3 votes
1 answer
843 views

I've been working on an edit/update button that will toggle a modal that looks like this: Is there a better code for this JavaScript code that I made? ...
Gene Adrian San Luis's user avatar

1
2 3 4 5
8