Skip to content
Advertisement

Tag: ajax

in Ajax, how to write “headers” for multiple condition?

as a beginner, I have some problems in using Ajax (with Discogs API) .. to get a discogs request token, discogs is saying https://www.discogs.com/developers#page:authentication,header:authentication-discogs-auth-flow but, how to write this header? below is my trying code, but I know this is not proper. Answer You said: It isn’t possible to specify headers for JSONP requests. The API can’t be using JSONP.

How to determine if mutation has been called?

I have this mutation observer function below. The issue is that if the condition is met for “false” that console.log will log many times in the browser. I think the best way to fix this is to add something in here that if the mutation is met don’t run function. Does adding in mutationObserver.disconnect(); after the else if condition the

How do I access a JSON array in JavaScript

I have a PHP script to which I make an Ajax request, and most of it works okay, but I’m having trouble accessing an array in the data returned to the JavaScript function. So, the PHP has a bunch of regular variables, and one array. The array, $places, has four elements, which each have three values, as so: A relevant

convert datetime to string using AJAX

Guys I would like to ask for your help I have here a Get Method using AJAX I successfully get the date from database this is the output 2020-08-13T00:00:00 however I wanted to convert the date format to this 2020-08-13 how can I convert the the datetime? below is my code /Get/ $(document).ready(function () { }) Thank you for your

Advertisement