본 사이트는 여러분의 사용자 경험을 개선하기 위해 유지 보수를 진행하는 동안 기능이 제한됩니다. 도움말로 문제가 해결되지 않고 질문을 하고 싶다면 Twitter의 @FirefoxSupport 및 Reddit의 /r/firefox 채널을 활용하세요.

Mozilla 도움말 검색

고객 지원 사기를 피하세요. 저희는 여러분께 절대로 전화를 걸거나 문자를 보내거나 개인 정보를 공유하도록 요청하지 않습니다. "악용 사례 신고"옵션을 사용하여 의심스러운 활동을 신고해 주세요.

자세히 살펴보기

FormData is working inconsistently

more options

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

In one part of my code (generated by PHP) the following is working correctly: FD = new FormData() FD.append('V',<?=$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',<?=$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

모든 댓글 (4)

more options

Possibly useful links here: Where to go for developer support

more options

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()

more options
more options

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.