I’m trying to remove jQuery from some code. I only use it for POST operations so I want to drop it and use fetch() instead. But I can’t get fetch() to work using the same data. The php file is working OK, it is just not receiving the data This sets up the test data for both test cases below:
Tag: jquery
Ajax post requests 403 error only for some users?
I’ve been testing my site by having friends try it, and some friends get the 403 Forbidden error on any function using ajax. I’m confused why only some of them get the error, especially when everyone used the same browser. Does anyone know why? I’m using Django as a framework and I think I&#…
How do I sum all checkboxes in javascript / jquery and how can it be dynamically displayed in a bootstrap label?
I am trying to get it dynamic but I just can’t get it done. The label must add up all checkboxes and if a checkbox is checked or unchecked the total count number must be up or down. If one checkbox is clicked and it is checked, the label must go up with +1, if the checkbox is clicked and
Fire only one button in buttons list using jQuery
I’m struggling trying to figure out a weird issue. I have a table with several rows, each row has a column with action buttons, the code to draw the buttons group is the following: If user click on edit buton I want to start a Javascript ( jQuery) function, otherwise I start the remove function. Below t…
Need for modification of the javascript countdown code
Please i have a JavaScript countdown timer code that i got from stackoverflow that is a solution to my countdown timer project. this existing code counts down time from 30minutes down to 1 and start over again. and it gives the same count result to every user at the same time. But my challenge with the code i…
Javascript Function Defining Performance on Browsers
Is there any browser performance difference between defining javascript functions before and after DOM loaded? I usually define functions after DOM loaded like this and some people use this way Theory-1: They say Example-1 is slower than Example-2 because Example-1 waited DOM to load then started to define fu…
JS append elements
I am generating some <li> with JS into my list. This <li> consist from few elements, such as <div>, <section>, etc. And my question is. For now, I generate exact number of elements into the array and then I append these elements from that array. But I would like to know, if I am able t…
jQuery method .find() with special character (&)
I’m getting a “Syntax error, unrecognized expression” when running the following jQuery: What options do I have where the href value would be #one-&-two and I’m trying to toggle the class on an element within a div#mega-menu with id=”#one-&-two” ? I’ve tried e…
Why won’t all the data get displayed on the browser even though all data is being displayed in console.log()?
I’m using an $.ajax(); request to make a call to my controller. Inside the console.log();, it’s correctly displaying all of the data coming in but when I try to display it on the browser via $(‘#displayCoins’).text(item.oldCoins); – only the very last piece of data if being displ…
Request to Google Apps Script URL for deployed WebApp produces 404 error
This issue is very similar to others (like Google Drive Page Not Found – Sorry, unable to open the file at this time for example) posted here. It’s not exactly the same, but I do believe it has the same root issue illustrated in that post in that trying to submit a form to a Google App Script whil…