# Javascript & Ajax

**URL:** https://www.phphelp.com/c/javascript-ajax/17.md?page=1

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

**Page:** 2

---

## [Converting the entered currency amounts when I change the currency](https://www.phphelp.com/t/converting-the-entered-currency-amounts-when-i-change-the-currency/34912)

<div class="topic-metadata">

**Author:** [@Adem](https://www.phphelp.com/u/Adem)\
**Replies:** 1\
**Last updated:** [August 2, 2022, 3:36pm UTC](https://www.phphelp.com/t/converting-the-entered-currency-amounts-when-i-change-the-currency/34912 "2022-08-02T15:36:56Z")

</div>

Hello, When I change the currency with the Select option option, I want the coins just below to be converted \<select size="1" name="currency"\> \<option selected value="USD"\>USD\</option\> \<option value="EURO"\>EURO\</opt…

---

## [Localstorage](https://www.phphelp.com/t/localstorage/34911)

<div class="topic-metadata">

**Author:** [@exeq](https://www.phphelp.com/u/exeq)\
**Replies:** 2\
**Last updated:** [August 2, 2022, 3:01pm UTC](https://www.phphelp.com/t/localstorage/34911 "2022-08-02T15:01:03Z")

</div>

Hello, I haven’t done much coding lately so been reading and started to do a dark theme for my web to keep doing stuff. I’ve made an icon with: Id = "icon" And I’ve used jquery to do a toggle class and it works ok, the…

---

## [Message not appears in Chat system in Blab](https://www.phphelp.com/t/message-not-appears-in-chat-system-in-blab/33054)

<div class="topic-metadata">

**Author:** [@Rahil](https://www.phphelp.com/u/Rahil)\
**Replies:** 43\
**Last updated:** [July 31, 2022, 3:03pm UTC](https://www.phphelp.com/t/message-not-appears-in-chat-system-in-blab/33054 "2022-07-31T15:03:54Z")

</div>

Hello experts. i m new here. I have installed a chat script to my website. it has a strange error. i write messages but thy not a ppears on board in main chat and not in private chat. Smilies also not working, but Paint…

---

## [Dependance dropdown selection not working help](https://www.phphelp.com/t/dependance-dropdown-selection-not-working-help/34861)

<div class="topic-metadata">

**Author:** [@rmumba10](https://www.phphelp.com/u/rmumba10)\
**Replies:** 4\
**Last updated:** [July 5, 2022, 9:09pm UTC](https://www.phphelp.com/t/dependance-dropdown-selection-not-working-help/34861 "2022-07-05T21:09:40Z")

</div>

I have 2 dropdown boxes namely “state” & “city”, so when i click on state i should see all cities under that specific state. I can get record from databse for states but for cities its not working, please help, my databa…

---

## [Php and AJAX Live Search](https://www.phphelp.com/t/php-and-ajax-live-search/34776)

<div class="topic-metadata">

**Author:** [@Adem](https://www.phphelp.com/u/Adem)\
**Replies:** 2\
**Last updated:** [May 28, 2022, 9:57am UTC](https://www.phphelp.com/t/php-and-ajax-live-search/34776 "2022-05-28T09:57:47Z")

</div>

Hello, There are 3 pieces of information, title and content, for each person in the database. In live search, I want to make a live search only from the red-framed area. My question is: The search result seen in…

---

## [How to open new tab page when ajax is successful](https://www.phphelp.com/t/how-to-open-new-tab-page-when-ajax-is-successful/34728)

<div class="topic-metadata">

**Author:** [@Adem](https://www.phphelp.com/u/Adem)\
**Replies:** 7\
**Last updated:** [May 18, 2022, 1:42pm UTC](https://www.phphelp.com/t/how-to-open-new-tab-page-when-ajax-is-successful/34728 "2022-05-18T13:42:43Z")

</div>

Hello, When I click with the code below, a new tab opens without being blocked \<a onclick="pdf\_dow('201')"\>PDF\</a\> function pdf\_dow(pdf\_dow\_id){ window.open('../pdf.php?pdf=' + pdf\_dow\_id, '\_blank'); } However…

---

## [Detect when element in viewport](https://www.phphelp.com/t/detect-when-element-in-viewport/34741)

<div class="topic-metadata">

**Author:** [@PHPNob](https://www.phphelp.com/u/PHPNob)\
**Replies:** 2\
**Last updated:** [May 10, 2022, 7:07pm UTC](https://www.phphelp.com/t/detect-when-element-in-viewport/34741 "2022-05-10T19:07:57Z")

</div>

Trying to understand how this code works to detect when an element in viewport so first we get getBoundingClientRect() of the element and then check if the top in that DOMRect is less than window.innerHeight that mea…

---

## [Change html table cell background colour depending on content](https://www.phphelp.com/t/change-html-table-cell-background-colour-depending-on-content/34730)

<div class="topic-metadata">

**Author:** [@Pedroski55](https://www.phphelp.com/u/Pedroski55)\
**Replies:** 1\
**Last updated:** [May 6, 2022, 9:26am UTC](https://www.phphelp.com/t/change-html-table-cell-background-colour-depending-on-content/34730 "2022-05-06T09:26:08Z")

</div>

I should say I don’t know anything about js really. But I think this is a situation where js would be applicable I have some php and an output.php webpage. The webpage basically shows a table with 3 columns, question n…

---

## [I want to add rows and do math operation](https://www.phphelp.com/t/i-want-to-add-rows-and-do-math-operation/34707)

<div class="topic-metadata">

**Author:** [@Adem](https://www.phphelp.com/u/Adem)\
**Replies:** 13\
**Last updated:** [April 29, 2022, 7:03am UTC](https://www.phphelp.com/t/i-want-to-add-rows-and-do-math-operation/34707 "2022-04-29T07:03:40Z")

</div>

Hello, I’m trying to make a service form I want to calculate the total cost by entering the materials and prices used during the repair There is a default line as seen in the image below I’m calculating in this defau…

---

## [Hidden checkbox required to be checked even when hidden](https://www.phphelp.com/t/hidden-checkbox-required-to-be-checked-even-when-hidden/34714)

<div class="topic-metadata">

**Author:** [@exeq](https://www.phphelp.com/u/exeq)\
**Replies:** 5\
**Last updated:** [April 29, 2022, 2:08pm UTC](https://www.phphelp.com/t/hidden-checkbox-required-to-be-checked-even-when-hidden/34714 "2022-04-29T14:08:18Z")

</div>

Hello people, how you been? Well I’m wondering what’s the best way to do this. I’m using html5 required for a very simple validation, and I have a checkbox that only displays if you meet some conditions. You then have …

---

## [Controlling characters when pasting](https://www.phphelp.com/t/controlling-characters-when-pasting/34649)

<div class="topic-metadata">

**Author:** [@bensan](https://www.phphelp.com/u/bensan)\
**Replies:** 19\
**Last updated:** [April 28, 2022, 12:35pm UTC](https://www.phphelp.com/t/controlling-characters-when-pasting/34649 "2022-04-28T12:35:48Z")

</div>

Can anybody advise me on how to control the characters when pasting? I have the following Javascript for example that limits characters to numbers only, which works good; function accept\_alphanumeric\_only(e, t) { var …

---

## [Regex Challenge](https://www.phphelp.com/t/regex-challenge/34710)

<div class="topic-metadata">

**Author:** [@PHPNob](https://www.phphelp.com/u/PHPNob)\
**Replies:** 4\
**Last updated:** [April 27, 2022, 4:00pm UTC](https://www.phphelp.com/t/regex-challenge/34710 "2022-04-27T16:00:39Z")

</div>

What does ?= do at the beginning ? since it checks if a pattern or character is followed by something like x(?=y) Why do we need it at the beginning? ." FCC Solution /(?=\\w{6})(?=\\w\*\\d{2})/ Link

---

## [A Healthy Web Page](https://www.phphelp.com/t/a-healthy-web-page/34686)

<div class="topic-metadata">

**Author:** [@Strider64](https://www.phphelp.com/u/Strider64)\
**Replies:** 1\
**Last updated:** [April 18, 2022, 1:08pm UTC](https://www.phphelp.com/t/a-healthy-web-page/34686 "2022-04-18T13:08:13Z")

</div>

I’ve been trying to lose weight by walking and watching what I eat as I’m border on having blood pressure. OK, I will stop boring with my medical situation, but it ties into a little application that I am writing with Va…

---

## [If text in input box edited, then change the option from select next to it](https://www.phphelp.com/t/if-text-in-input-box-edited-then-change-the-option-from-select-next-to-it/34669)

<div class="topic-metadata">

**Author:** [@exeq](https://www.phphelp.com/u/exeq)\
**Replies:** 5\
**Last updated:** [April 14, 2022, 11:01pm UTC](https://www.phphelp.com/t/if-text-in-input-box-edited-then-change-the-option-from-select-next-to-it/34669 "2022-04-14T23:01:26Z")

</div>

Hello ppl, I’m wondering how to do this individually(since i have others inputs all the same) for inputs and the select next to that input. If the user, edits what he wrote earlier in the input box, then change the sele…

---

## [(Solved) Changing text displayed at end of countdown in timer script](https://www.phphelp.com/t/solved-changing-text-displayed-at-end-of-countdown-in-timer-script/34634)

<div class="topic-metadata">

**Author:** [@foxclone](https://www.phphelp.com/u/foxclone)\
**Replies:** 1\
**Last updated:** [April 1, 2022, 7:29pm UTC](https://www.phphelp.com/t/solved-changing-text-displayed-at-end-of-countdown-in-timer-script/34634 "2022-04-01T19:29:38Z")

</div>

I’m using a timer script that I’d like to change the displayed text when the countdown ends but have no idea how to accomplish it. I’d appreciate any help I can get. Here’s the code I’m using: \<p\> The Update will be …

---

## [Converting a date format to a local date format](https://www.phphelp.com/t/converting-a-date-format-to-a-local-date-format/34624)

<div class="topic-metadata">

**Author:** [@Adem](https://www.phphelp.com/u/Adem)\
**Replies:** 2\
**Last updated:** [April 1, 2022, 7:47am UTC](https://www.phphelp.com/t/converting-a-date-format-to-a-local-date-format/34624 "2022-04-01T07:47:02Z")

</div>

Hello, I cannot change the format because this date format is the countdown code. I want to convert this date format to show in local text How can I convert this “31 Mar 2022 15:00:00” date format to local date format…

---

## [AJAX script that nead debugging](https://www.phphelp.com/t/ajax-script-that-nead-debugging/34631)

<div class="topic-metadata">

**Author:** [@Leon](https://www.phphelp.com/u/Leon)\
**Replies:** 0\
**Last updated:** [March 31, 2022, 4:01pm UTC](https://www.phphelp.com/t/ajax-script-that-nead-debugging/34631 "2022-03-31T16:01:34Z")

</div>

Whether there is a debugger for AJAX (and XHTML) is unlikely, but if there is a debugger for JAVA I would manage for a long time. I have little knowledge of JAVA / AJAX, but have a script that should have been debugged. …

---

## [There was a problem downloading the pdf file](https://www.phphelp.com/t/there-was-a-problem-downloading-the-pdf-file/34586)

<div class="topic-metadata">

**Author:** [@Adem](https://www.phphelp.com/u/Adem)\
**Replies:** 1\
**Last updated:** [March 15, 2022, 8:58am UTC](https://www.phphelp.com/t/there-was-a-problem-downloading-the-pdf-file/34586 "2022-03-15T08:58:06Z")

</div>

Hello, I am using the below code to download PDF file but now a problem started to occur and the download is failing I wonder where is the error? function pdf\_dow(butonid, url\_link, dosya\_adi) { // İndiriliyor …

---

## [Use function in multiple divs?](https://www.phphelp.com/t/use-function-in-multiple-divs/34443)

<div class="topic-metadata">

**Author:** [@Anette](https://www.phphelp.com/u/Anette)\
**Replies:** 5\
**Last updated:** [January 24, 2022, 12:05pm UTC](https://www.phphelp.com/t/use-function-in-multiple-divs/34443 "2022-01-24T12:05:24Z")

</div>

If I have four div’s with id 1,2,3,4 and I want this function to write “good morning” in each div. My code below does not work. Does anyone know? function beCheerful(x) { let line = ""; var box = document.getElemen…

---

## [Friends list and Offlines](https://www.phphelp.com/t/friends-list-and-offlines/34393)

<div class="topic-metadata">

**Author:** [@Rahil](https://www.phphelp.com/u/Rahil)\
**Replies:** 1\
**Last updated:** [January 15, 2022, 4:11pm UTC](https://www.phphelp.com/t/friends-list-and-offlines/34393 "2022-01-15T16:11:44Z")

</div>

hello experts, i have a chat. it doesn’t have a friends list. how can I add friends list and offline messages to friends si when they come online they can see offlines.

---

## [Place focus on specific cell after ajax and trigger('update') with row defined](https://www.phphelp.com/t/place-focus-on-specific-cell-after-ajax-and-trigger-update-with-row-defined/34423)

<div class="topic-metadata">

**Author:** [@Book](https://www.phphelp.com/u/Book)\
**Replies:** 2\
**Last updated:** [January 14, 2022, 6:09pm UTC](https://www.phphelp.com/t/place-focus-on-specific-cell-after-ajax-and-trigger-update-with-row-defined/34423 "2022-01-14T18:09:15Z")

</div>

I have a dynamic table that reloads when the user(closed system) makes a change to the tableQtyUpd field. what i need to do is have the cursor focus set to next input tablePrice in that row. tableQID is a unique, and non…

---

## [How to add multiple datatables in one page](https://www.phphelp.com/t/how-to-add-multiple-datatables-in-one-page/34390)

<div class="topic-metadata">

**Author:** [@Adem](https://www.phphelp.com/u/Adem)\
**Replies:** 7\
**Last updated:** [January 8, 2022, 9:36pm UTC](https://www.phphelp.com/t/how-to-add-multiple-datatables-in-one-page/34390 "2022-01-08T21:36:07Z")

</div>

Hello, How to add multiple datatables in one page window.addEventListener('DOMContentLoaded', event =\> { // Simple-DataTables // https://github.com/fiduswriter/Simple-DataTables/wiki const datatablesSimp…

---

## [Events to js calendar](https://www.phphelp.com/t/events-to-js-calendar/34367)

<div class="topic-metadata">

**Author:** [@Anette](https://www.phphelp.com/u/Anette)\
**Replies:** 5\
**Last updated:** [December 17, 2021, 5:41pm UTC](https://www.phphelp.com/t/events-to-js-calendar/34367 "2021-12-17T17:41:12Z")

</div>

Hi! Does anyone know how to add events to this calendar? Edit fiddle - JSFiddle - Code Playground /very grateful for help.

---

## [Multiple div's HELP!](https://www.phphelp.com/t/multiple-divs-help/34347)

<div class="topic-metadata">

**Author:** [@Anette](https://www.phphelp.com/u/Anette)\
**Replies:** 2\
**Last updated:** [December 8, 2021, 10:56am UTC](https://www.phphelp.com/t/multiple-divs-help/34347 "2021-12-08T10:56:04Z")

</div>

Hi! I can not get this working. And hope for someone to help me out. I have a calendar made in js and it shows up in the div “days” with .document.querySelector(".days"); How can I make it show in two div’s? like day…

---

## [Checkbox handling](https://www.phphelp.com/t/checkbox-handling/34306)

<div class="topic-metadata">

**Author:** [@Waspman](https://www.phphelp.com/u/Waspman)\
**Replies:** 4\
**Last updated:** [December 7, 2021, 5:34pm UTC](https://www.phphelp.com/t/checkbox-handling/34306 "2021-12-07T17:34:42Z")

</div>

Trying to convert program from Delphi to web-based. Currently I have implemented most of it using HTML/PHP with a bit of javascript that I found online. However am having problems with part of it. Basically it is a ta…

---

## [Javascript login](https://www.phphelp.com/t/javascript-login/34346)

<div class="topic-metadata">

**Author:** [@SnoopDogg](https://www.phphelp.com/u/SnoopDogg)\
**Replies:** 0\
**Last updated:** [December 6, 2021, 7:25pm UTC](https://www.phphelp.com/t/javascript-login/34346 "2021-12-06T19:25:04Z")

</div>

i need help with a little piece of js… it’s jsut a logon screen and it randomly selects a pic for the background… i’d like it so it’s set to one directory and whoever can select a pic to use for the background… i’m no go…

---

## [Js function with parameters](https://www.phphelp.com/t/js-function-with-parameters/34296)

<div class="topic-metadata">

**Author:** [@Anette](https://www.phphelp.com/u/Anette)\
**Replies:** 2\
**Last updated:** [November 24, 2021, 11:17am UTC](https://www.phphelp.com/t/js-function-with-parameters/34296 "2021-11-24T11:17:08Z")

</div>

Hello! How can I make a button increase date by 1? It should work for red and green simultaneously. Can I do a function in funk? And how do I access it whitout id? function funk(id){ const date = new Date(); if(id…

---

## [Flatpickr convert numbers as dates](https://www.phphelp.com/t/flatpickr-convert-numbers-as-dates/34276)

<div class="topic-metadata">

**Author:** [@Adem](https://www.phphelp.com/u/Adem)\
**Replies:** 9\
**Last updated:** [November 23, 2021, 3:54pm UTC](https://www.phphelp.com/t/flatpickr-convert-numbers-as-dates/34276 "2021-11-23T15:54:44Z")

</div>

Hello, I’m using the calendar icon flatpickr next to manual search input but I can’t solve a problem When I want to do a manual search with product code “1636835408” it converts “1638-11-08” as a date How do I disable…

---

## [Acces js const from html file](https://www.phphelp.com/t/acces-js-const-from-html-file/34267)

<div class="topic-metadata">

**Author:** [@Anette](https://www.phphelp.com/u/Anette)\
**Replies:** 2\
**Last updated:** [November 20, 2021, 7:35am UTC](https://www.phphelp.com/t/acces-js-const-from-html-file/34267 "2021-11-20T07:35:22Z")

</div>

if I have an js file with an function and parameters. ex: const renderCar = (param1, param2) =\> { //do something } renderCar (); How do I acces it from an html file?? Please does anyone know?

---

## [Setting a limit on the maximum number of input fields](https://www.phphelp.com/t/setting-a-limit-on-the-maximum-number-of-input-fields/34254)

<div class="topic-metadata">

**Author:** [@Adem](https://www.phphelp.com/u/Adem)\
**Replies:** 2\
**Last updated:** [November 12, 2021, 1:27pm UTC](https://www.phphelp.com/t/setting-a-limit-on-the-maximum-number-of-input-fields/34254 "2021-11-12T13:27:50Z")

</div>

Hello, I want to allow only numbers from 0 to 45 in the input field, not characters. Must have number entry permissions such as 5.05, 8.75 This code allows input of number in 0.00 format and how to set input limit of …

[Previous page](https://www.phphelp.com/c/javascript-ajax/17.md)

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