FormData is working inconsistently
In one part of my code (generated by PHP) the following is working correctly:
FD = new FormData() FD.append('V',) FD.append('F','add') FD.append('D',NewI) FD.append('N',N) SetReq()
function SetReq() {
XReq = new XMLHttpRequest() XReq.onreadystatechange = function() {XReady()}
XReq.open('POST','NewsIU2.php') XReq.send(FD) } Another part of my code is not working
var FD = new FormData() FD.append('V',) FD.append('F','delete') FD.append('D',B) SetReq()
When it gets to the PHP program the the first case has $_POST('F') = 'add', the second case is empty
Összes válasz (4)
Possibly useful links here: Where to go for developer support
Stack Overflow is normally the worst place to look. Hard to follow. Two cases, one works fine the other fails. It cannot be a coding problem. Some of advance techniques recommended by MDN causing code to quit, like FormData.get()
Did you check the Web Console and possibly the Network Monitor?
Col_Boogie said
Stack Overflow is normally the worst place to look. Hard to follow.
But you can start your own thread, you don't need to follow someone else's.