Cannot read properties of undefined (reading ‘ajax‘); Cannot read property ‘ajax‘ of undefined
Sending requests using ajax in jQuery. it report an error: Cannot read properties of undefined (reading 'ajax'); Cannot read property 'ajax' of undefined
Codes that report an error:
$.ajax({
type:"POST",
url:"pageServlet",
data:jsonData,
dataType:"json",
success:function (data) {
alert(data);
}
})
Solution: Change $ to jQuery
jQuery.ajax({
type:"POST",
url:"pageServlet",
data:jsonData,
dataType:"json",
success:function (data) {
alert(data);
}
})
Read More:
- [Solved] react18 swiper Error: Cannot read properties of undefined (reading ‘wrapperClass’)
- Can’t read property ‘push’ of undefined [How to Solve]
- Vue error in render: “typeerror: cannot read property ‘length’ of undefined”
- [Solved] Vue + uniapp Uncaught TypeError: Cannot read property ‘getters‘ of undefined
- Wechat program typeerror: a solution to cannot read property ‘SetData’ of undefined
- [Solved] Echarts Error: Cannot read property ‘init‘ of undefined
- [Vue warn]: Error in render: TypeError: Cannot read property ‘xxxx’of undefined
- [Solved] Vue Error: Uncaught TypeError: Cannot read property ‘getters‘ of undefined
- [Solved] Parcel Package Error: Cannot read property ‘length‘ of undefined
- [Solved] VUE Use Filters Error: [Vue warn]: Error in render: “TypeError: Cannot read property ‘toFixed’ of undefined”
- [Solved] TypeError: Cannot read property ‘indexOf‘ of undefined at VueComponent.resetFields
- cesium CLAMP_TO_GROUND Error Cannot read property ‘globe‘ of undefined
- Uniapp: TypeError: Cannot read property ‘apply‘ of undefined (H5 does not report an error, but the real machine runs with an error)
- Vue Error in callback for immediate watcher “height”: “TypeError: Cannot read property ‘style’ of
- Ajax prevents page requests from reporting errors
- The Ajax return value reports an error, and the spring boot development Ajax return value reports an error
- [Solved] uview u-sticky Error: Cannot read property ‘bottom‘ of null
- El-cascader error: Cannot read property’level’ of null
- VUE Echarts Loading Error TypeError: Cannot read property getAttribute of null?
- openlayers — Cannot read property ‘slice‘ of null—Map cannot be loaded