jquery ajax Uncaught TypeError: Illegal invocation
This error is due to formData which is json object and by default ajax requrie
values to be in string format and as a solution
1. you can either remove formData and pass the values separately
data: { username: document.getElementById('createUserForm').value }
2. you can set the dataType to be 'json' and processData to be false
$.ajax({
url : base_url+'index.php',
type: 'POST',
dataType: 'json',
data: data,
cache : false,
processData: false
})
Also in JavaScript:
- detect adblock javascript
- how to add up all the numbers in between 0 and that number
- react get data attribute from element
- react use effect
- javascript events
- getFullYear within moment in angular
- javascript open pdf in new tab
- packages.json from file
- how to load existing json data in nuxt
- remove character at index from string javascript
- regular expression match interviewbit solution
- get response api using vanilajavascript
- store current date in chrome storage extension
- html include js file flask
- mysql json change key
- convert excel file to json using node js
- adonisjs column default value
- reactjs Module not found: Can't resolve 'styled-components
- https.get module in nodejs
- chartjs bar data on top
- onchange value in hidden input
- fetch is not defined amazon-cognito-identity-js
- how to get the number of days in a month in javascript
- res object anatomy nodejs