# Javascript & Ajax

**URL:** https://www.phphelp.com/c/javascript-ajax/17.md

[Latest](https://www.phphelp.com/latest.md) · [Categories](https://www.phphelp.com/categories.md)

---

## [About the Javascript & Ajax category](https://www.phphelp.com/t/about-the-javascript-ajax-category/8576)

<div class="topic-metadata">

**Author:** [@system](https://www.phphelp.com/u/system)\
**Replies:** 0\
**Last updated:** [July 16, 2018, 5:46am UTC](https://www.phphelp.com/t/about-the-javascript-ajax-category/8576 "2018-07-16T05:46:16Z")

</div>

Anything related to javascript.

---

## [One script working one not, virtually identical](https://www.phphelp.com/t/one-script-working-one-not-virtually-identical/36478)

<div class="topic-metadata">

**Author:** [@Beauford](https://www.phphelp.com/u/Beauford)\
**Replies:** 6\
**Last updated:** [May 19, 2025, 7:53pm UTC](https://www.phphelp.com/t/one-script-working-one-not-virtually-identical/36478 "2025-05-19T19:53:22Z")

</div>

I found a javascript/ajax script that I used several years ago for inline editing of a customer list and it still works perfectly. I thought I would re-purpose this to make a bank ledger but for the life of me I can not …

---

## [Vanilla JavaScript Trivia using Modules](https://www.phphelp.com/t/vanilla-javascript-trivia-using-modules/36354)

<div class="topic-metadata">

**Author:** [@Strider64](https://www.phphelp.com/u/Strider64)\
**Replies:** 0\
**Last updated:** [December 30, 2024, 3:20am UTC](https://www.phphelp.com/t/vanilla-javascript-trivia-using-modules/36354 "2024-12-30T03:20:05Z")

</div>

I have been developing a Trivia game for years now using Vanilla JavaScript and I finally using AI to help me. Yes, I know some people consider it cheating, but you still need to know how to code and do HTML/CSS as AI is…

---

## [JQuery AJAX not being received by PHP](https://www.phphelp.com/t/jquery-ajax-not-being-received-by-php/36140)

<div class="topic-metadata">

**Author:** [@Waspman](https://www.phphelp.com/u/Waspman)\
**Replies:** 4\
**Last updated:** [May 7, 2024, 11:37am UTC](https://www.phphelp.com/t/jquery-ajax-not-being-received-by-php/36140 "2024-05-07T11:37:19Z")

</div>

I have never used JQuery before - and I am trying to use it to call a PHP script. However it appears not to work - can anyone explain why? The PHP is: error\_log("In PHP...",3,"logs/dbc.log"); //\<====================…

---

## [Filter\_price](https://www.phphelp.com/t/filter-price/36096)

<div class="topic-metadata">

**Author:** [@destech](https://www.phphelp.com/u/destech)\
**Replies:** 0\
**Last updated:** [April 7, 2024, 3:03am UTC](https://www.phphelp.com/t/filter-price/36096 "2024-04-07T03:03:12Z")

</div>

\<?php ob\_start(); ?\> \<!DOCTYPE html\> \<html\> \<head\> \<title\>Travelafric.com\</title\> \<?php require 'template/head.html'; ?\> \</head\> \<body\> \<div id="page-wrapper"\> \<?php require 'template/nav.php'; ?\>…

---

## [How to call a change function with two different options](https://www.phphelp.com/t/how-to-call-a-change-function-with-two-different-options/36055)

<div class="topic-metadata">

**Author:** [@Adem](https://www.phphelp.com/u/Adem)\
**Replies:** 1\
**Last updated:** [March 5, 2024, 5:49pm UTC](https://www.phphelp.com/t/how-to-call-a-change-function-with-two-different-options/36055 "2024-03-05T17:49:09Z")

</div>

I have a code like below. When I select a value in the Select option, I run the function with ‘#proje\_nedir’. I also want the function to run when I deselect the selection box. However, without using ‘#proje\_nedir’ $…

---

## [Issue with the wow-delay?](https://www.phphelp.com/t/issue-with-the-wow-delay/35849)

<div class="topic-metadata">

**Author:** [@mslilafowler](https://www.phphelp.com/u/mslilafowler)\
**Replies:** 1\
**Last updated:** [February 12, 2024, 3:19am UTC](https://www.phphelp.com/t/issue-with-the-wow-delay/35849 "2024-02-12T03:19:22Z")

</div>

Hi, my gallery images stack up on the first visit but display fine after a page reload. Any idea what’s causing this? (live preview: https://seckinahsapdekorasyon.com/galeri) \<!-- Gallery Start --\> \<div class="c…

---

## [Trying to use AJAX to display a spinner during php code execution, then show error, or redirect on success](https://www.phphelp.com/t/trying-to-use-ajax-to-display-a-spinner-during-php-code-execution-then-show-error-or-redirect-on-success/35985)

<div class="topic-metadata">

**Author:** [@zoldos](https://www.phphelp.com/u/zoldos)\
**Replies:** 6\
**Last updated:** [January 21, 2024, 12:10am UTC](https://www.phphelp.com/t/trying-to-use-ajax-to-display-a-spinner-during-php-code-execution-then-show-error-or-redirect-on-success/35985 "2024-01-21T00:10:16Z")

</div>

I have a simple PHP script that collects an e-mail via an HTML form, then sends a message to it. But there is a delay when pressing submit as the script executes. So, I’m trying to use AJAX and JS to display a spinner …

---

## [PHP Ajax Insert Data in MySQL By Using Bootstrap Modal](https://www.phphelp.com/t/php-ajax-insert-data-in-mysql-by-using-bootstrap-modal/35905)

<div class="topic-metadata">

**Author:** [@uksherminator](https://www.phphelp.com/u/uksherminator)\
**Replies:** 1\
**Last updated:** [December 7, 2023, 11:10pm UTC](https://www.phphelp.com/t/php-ajax-insert-data-in-mysql-by-using-bootstrap-modal/35905 "2023-12-07T23:10:29Z")

</div>

Hi there, I am using this code to refresh a table containing radio boxes that are used to select a delivery address on a form. If the user needs to add a new delivery address, the entire form input boxes remain populated…

---

## [Reloading the folder tree with a trigger](https://www.phphelp.com/t/reloading-the-folder-tree-with-a-trigger/35822)

<div class="topic-metadata">

**Author:** [@Adem](https://www.phphelp.com/u/Adem)\
**Replies:** 2\
**Last updated:** [November 10, 2023, 5:55pm UTC](https://www.phphelp.com/t/reloading-the-folder-tree-with-a-trigger/35822 "2023-11-10T17:55:39Z")

</div>

Hello, I use the code in the following url as a folder tree. I am deleting a selected directory or file in this folder tree. There’s no problem here When the file or directory deleted message notification window clos…

---

## [Advice about saving HTML table data using JSON](https://www.phphelp.com/t/advice-about-saving-html-table-data-using-json/35804)

<div class="topic-metadata">

**Author:** [@Waspman](https://www.phphelp.com/u/Waspman)\
**Replies:** 0\
**Last updated:** [November 5, 2023, 9:50pm UTC](https://www.phphelp.com/t/advice-about-saving-html-table-data-using-json/35804 "2023-11-05T21:50:35Z")

</div>

I need to pass data from an HTML table to a PHP script to save the data to a MySQL table. The table will contain between 10 and 25 rows. I am using Javascript (not Jquery) to parse the table, and, for each table row, I …

---

## [Bootstrap Multiselect: Applying limits to selected items in multiple uses](https://www.phphelp.com/t/bootstrap-multiselect-applying-limits-to-selected-items-in-multiple-uses/35706)

<div class="topic-metadata">

**Author:** [@Adem](https://www.phphelp.com/u/Adem)\
**Replies:** 1\
**Last updated:** [September 21, 2023, 6:57am UTC](https://www.phphelp.com/t/bootstrap-multiselect-applying-limits-to-selected-items-in-multiple-uses/35706 "2023-09-21T06:57:29Z")

</div>

Hello, I need to use Bootstrap Multiselect more than once with the same class name on the page. There is a problem with multiple use of only one feature(Depending on the operation to be done with the Select option, the…

---

## [Product sales statistics chart by month](https://www.phphelp.com/t/product-sales-statistics-chart-by-month/35577)

<div class="topic-metadata">

**Author:** [@Adem](https://www.phphelp.com/u/Adem)\
**Replies:** 9\
**Last updated:** [August 14, 2023, 6:24am UTC](https://www.phphelp.com/t/product-sales-statistics-chart-by-month/35577 "2023-08-14T06:24:51Z")

</div>

Hello, What I want to do is show multiple product charts within each month https://jsfiddle.net/ademgenc/rym35aqx/ I tried to adapt this code I found ready for myself and I want to create this table with a query in th…

---

## [How to select time with day in calendar](https://www.phphelp.com/t/how-to-select-time-with-day-in-calendar/35468)

<div class="topic-metadata">

**Author:** [@Adem](https://www.phphelp.com/u/Adem)\
**Replies:** 2\
**Last updated:** [August 1, 2023, 6:13am UTC](https://www.phphelp.com/t/how-to-select-time-with-day-in-calendar/35468 "2023-08-01T06:13:25Z")

</div>

Hello, How do I make the hours, minutes and seconds are selected when I select the dates I have specified in the calendar? 2023-02-15 10:20:15 I want the hour, minute, and second here to be selected flatpickr(".ca…

---

## [Number the row](https://www.phphelp.com/t/number-the-row/35101)

<div class="topic-metadata">

**Author:** [@Adem](https://www.phphelp.com/u/Adem)\
**Replies:** 1\
**Last updated:** [May 10, 2023, 7:32am UTC](https://www.phphelp.com/t/number-the-row/35101 "2023-05-10T07:32:07Z")

</div>

Hello, I’m adding a line, I want to number each line, but when the line is deleted from the middle or the end, how to make the numbers regenerate in order \<div class="optionBox"\> \<div class="form-floating mb-3"\> \<div…

---

## [Session variable to hide/unhide button](https://www.phphelp.com/t/session-variable-to-hide-unhide-button/35415)

<div class="topic-metadata">

**Author:** [@randelll](https://www.phphelp.com/u/randelll)\
**Replies:** 1\
**Last updated:** [April 24, 2023, 11:10am UTC](https://www.phphelp.com/t/session-variable-to-hide-unhide-button/35415 "2023-04-24T11:10:04Z")

</div>

I wish to use a session variable to hide a button that is in a column of 8 buttons. I have tried the following PHP code: \<?PHP if($\_SESSION\['user\_pkey'\]==1){ ?\> \<button class = …

---

## [Form input javascript](https://www.phphelp.com/t/form-input-javascript/34975)

<div class="topic-metadata">

**Author:** [@j84](https://www.phphelp.com/u/j84)\
**Replies:** 1\
**Last updated:** [April 8, 2023, 5:32pm UTC](https://www.phphelp.com/t/form-input-javascript/34975 "2023-04-08T17:32:32Z")

</div>

Im trying to make a simple form and want a number input for swedish social security ID The format is YYYYMMDDXXXX So max lenght 12 and min length 12. \<input type="number" min="0" pattern="\\d{11}" oninput="javascript:…

---

## [Infinite Scroll isnt working](https://www.phphelp.com/t/infinite-scroll-isnt-working/34016)

<div class="topic-metadata">

**Author:** [@Mekaboo](https://www.phphelp.com/u/Mekaboo)\
**Replies:** 2\
**Last updated:** [September 29, 2021, 2:39pm UTC](https://www.phphelp.com/t/infinite-scroll-isnt-working/34016 "2021-09-29T14:39:17Z")

</div>

Hey!! I added an infinite scroll to my code but its not working…just shows the loading.gif. The purpose of this is to create a timeline similar to Facebook(people make post then its pushed downward and combined with oth…

---

## [Javascript that works on windows, android and iphone](https://www.phphelp.com/t/javascript-that-works-on-windows-android-and-iphone/35372)

<div class="topic-metadata">

**Author:** [@Waspman](https://www.phphelp.com/u/Waspman)\
**Replies:** 0\
**Last updated:** [April 3, 2023, 8:51am UTC](https://www.phphelp.com/t/javascript-that-works-on-windows-android-and-iphone/35372 "2023-04-03T08:51:18Z")

</div>

I have an application written in PHP with some Javascript that works as expected using windows laptops and android phones. However there are a few places in it that do not work when the user is using an iphone, and they …

---

## [A nice weather API done in Vanilla JavaScript](https://www.phphelp.com/t/a-nice-weather-api-done-in-vanilla-javascript/35352)

<div class="topic-metadata">

**Author:** [@Strider64](https://www.phphelp.com/u/Strider64)\
**Replies:** 0\
**Last updated:** [March 21, 2023, 1:22am UTC](https://www.phphelp.com/t/a-nice-weather-api-done-in-vanilla-javascript/35352 "2023-03-21T01:22:29Z")

</div>

/\* \* Weather API can be found here -\> WeatherAPI.com \*/ // Use an IIFE to prevent pollution of the global namespace (() =\> { // Select the container element to display the weather data const weatherContainer …

---

## [Vanilla JS Gallery & Lightbox](https://www.phphelp.com/t/vanilla-js-gallery-lightbox/35336)

<div class="topic-metadata">

**Author:** [@Strider64](https://www.phphelp.com/u/Strider64)\
**Replies:** 0\
**Last updated:** [March 12, 2023, 12:37am UTC](https://www.phphelp.com/t/vanilla-js-gallery-lightbox/35336 "2023-03-12T00:37:20Z")

</div>

First of all a few minor lines of code was done by someone else though I did give her credit and it is public domain or permission granted (whatever the case may be?). I did make major modifications to the script. This …

---

## [Load Javascript Alert while the page is loading](https://www.phphelp.com/t/load-javascript-alert-while-the-page-is-loading/35331)

<div class="topic-metadata">

**Author:** [@bondikho](https://www.phphelp.com/u/bondikho)\
**Replies:** 1\
**Last updated:** [March 9, 2023, 2:41pm UTC](https://www.phphelp.com/t/load-javascript-alert-while-the-page-is-loading/35331 "2023-03-09T14:41:41Z")

</div>

0 Im wondering if its possible to load a JavaScript alert before the content while the page is loading Whatever I try to do the alert fires and the page doesn’t load until the alert is closed \<script\> alert('But …

---

## [Show and hide button using only html text name of button](https://www.phphelp.com/t/show-and-hide-button-using-only-html-text-name-of-button/35276)

<div class="topic-metadata">

**Author:** [@Adem](https://www.phphelp.com/u/Adem)\
**Replies:** 4\
**Last updated:** [February 18, 2023, 1:48am UTC](https://www.phphelp.com/t/show-and-hide-button-using-only-html-text-name-of-button/35276 "2023-02-18T01:48:52Z")

</div>

Hello, button has no id or class, the class name is the same in all three buttons How do I show and hide using only the text name of the button \<div class="div" style="display: block;"\> \<button class="standart"\>Evet\<…

---

## [Adding data to cell by td number of table with javascript](https://www.phphelp.com/t/adding-data-to-cell-by-td-number-of-table-with-javascript/35245)

<div class="topic-metadata">

**Author:** [@Adem](https://www.phphelp.com/u/Adem)\
**Replies:** 3\
**Last updated:** [January 22, 2023, 11:20am UTC](https://www.phphelp.com/t/adding-data-to-cell-by-td-number-of-table-with-javascript/35245 "2023-01-22T11:20:33Z")

</div>

Hello, Adds data to table cells without any problem with the following code for(i = 1; i \<= 24; i++) document.getElementsByTagName('td').item(i).firstChild.data = data('elem'+i,r); When I use this the second table is…

---

## [Some output Error in JS](https://www.phphelp.com/t/some-output-error-in-js/35200)

<div class="topic-metadata">

**Author:** [@Rahil](https://www.phphelp.com/u/Rahil)\
**Replies:** 0\
**Last updated:** [December 31, 2022, 10:38am UTC](https://www.phphelp.com/t/some-output-error-in-js/35200 "2022-12-31T10:38:22Z")

</div>

The script does not give or generate output code, Also a lline comes and visible in the page which prevents the code to generate the output code: \<!DOCTYPE html\> \<html\> \<head\> \<style\> /\* Add some styles …

---

## [Double and single quotes problem](https://www.phphelp.com/t/double-and-single-quotes-problem/35190)

<div class="topic-metadata">

**Author:** [@Adem](https://www.phphelp.com/u/Adem)\
**Replies:** 2\
**Last updated:** [December 29, 2022, 9:59am UTC](https://www.phphelp.com/t/double-and-single-quotes-problem/35190 "2022-12-29T09:59:36Z")

</div>

Hello, onClick="dow\_pdf('128', '2022-12-29-11-44','\<?php echo $file\_title; ?\>') The button is not clickable when the file title has single or double quotes in the text. What needs to be done to avoid that single and d…

---

## [Search function | add more values for the result to appear for](https://www.phphelp.com/t/search-function-add-more-values-for-the-result-to-appear-for/35073)

<div class="topic-metadata">

**Author:** [@darren\_azzopardi](https://www.phphelp.com/u/darren_azzopardi)\
**Replies:** 0\
**Last updated:** [October 17, 2022, 1:19pm UTC](https://www.phphelp.com/t/search-function-add-more-values-for-the-result-to-appear-for/35073 "2022-10-17T13:19:42Z")

</div>

Hi all, I’ve go a search function (auto complete) that allows the user to begin typing what they want and the closes match appears. But question is, because there could be several search terms for a particular item, I’…

---

## [I'm trying to use dynamic option creation](https://www.phphelp.com/t/im-trying-to-use-dynamic-option-creation/35043)

<div class="topic-metadata">

**Author:** [@Adem](https://www.phphelp.com/u/Adem)\
**Replies:** 0\
**Last updated:** [September 28, 2022, 1:16pm UTC](https://www.phphelp.com/t/im-trying-to-use-dynamic-option-creation/35043 "2022-09-28T13:16:45Z")

</div>

Hello, I have HTML table and I add row with add row button and one column has select option. “Dynamic option creation” does not work in the select option on the line where I added the add line button. I take the line …

---

## [How to check form input fields when using invisible reCAPTCHA](https://www.phphelp.com/t/how-to-check-form-input-fields-when-using-invisible-recaptcha/35008)

<div class="topic-metadata">

**Author:** [@Adem](https://www.phphelp.com/u/Adem)\
**Replies:** 0\
**Last updated:** [September 13, 2022, 10:54am UTC](https://www.phphelp.com/t/how-to-check-form-input-fields-when-using-invisible-recaptcha/35008 "2022-09-13T10:54:11Z")

</div>

Hello, I want to check form input fields when using invisible reCAPTCHA “required” doesn’t work Form continues with javascript/Jquery how to do this \<script src='https://www.google.com/recaptcha/api.js'\>\</script\> \<s…

---

## [Currency conversion function in javascript/jquery](https://www.phphelp.com/t/currency-conversion-function-in-javascript-jquery/34923)

<div class="topic-metadata">

**Author:** [@Adem](https://www.phphelp.com/u/Adem)\
**Replies:** 6\
**Last updated:** [August 6, 2022, 7:06am UTC](https://www.phphelp.com/t/currency-conversion-function-in-javascript-jquery/34923 "2022-08-06T07:06:35Z")

</div>

Hello, This php script converts product currency by currency Can we do the same in javascript/jquery function convert($cf,$urun,$secilen\_paracinsi\_id) { // if the product currency is the same as the selected currency…

[Next page](https://www.phphelp.com/c/javascript-ajax/17.md?page=1)
