2012-10-03 3 views
0

입력 필드를 제출하고 아약스 요청을 사용하여 파일을 업로드하려고합니다. 모든 것이 잘 작동합니다. 단, 숨겨진 입력 값은 $ (# job)로 보내지지 않습니다.숨겨진 입력이 Jquery를 사용하여 제출되지 않았습니다

  $.ajaxFileUpload({ 
        url   :'careers-training/apply-job/', 
        secureuri  :false, 
        fileElementId :'cv', 
        dataType : 'script', 
        data :{'job' : $('#job').val(),'name' : $('#name').val(),'email' : $('#email').val(),'mobile' : $('#mobile').val(),'cv' : $('#cv').val()}, 
        success : function (Response, status) 
        { 

         var jsonObject = $.parseJSON(Response); 
         if(jsonObject.length == 0) 
         { 
          $(this).HideLoadingPanel(); 
          $(this).ShowSuccessPanel(); 
          $("#job-application-box").hide(); 
          $("#body").attr('style','min-height:400px;') 

         }else{ 

          $(this).HideLoadingPanel(); 
          $(this).ShowErrorsBox(jsonObject); 

         } 

        } 
        }); 

이는 HTML입니다 :

이 가 가

그래서 당신이 날 도와 줘요 수

  <form name="apply-job-form" method="post" enctype="multipart/form-data"> 
       <input name="job" id="job" type="hidden" value="dd" /> 
       <label class="form-label">Name: </label> 
       <input class="form-input" type="text" id="name" name="name" /><br /> 
       <label class="form-label">Mobile: </label> 
       <input class="form-input" type="text" id="mobile" name="mobile" /><br /> 
       <label class="form-label">Email: </label> 
       <input class="form-input" type="text" id="email" name="email" /><br /> 
       <label class="form-label">CV: </label> 
       <input class="file-input" type="file" id="cv" name="cv" /> 
       <button type="button" id="apply-job-button" name="apply-job-button" class="form-button">Apply now !</button> 
      </form> 
?

+0

HTML을 제공해주십시오. – RedFilter

+0

HTML주세요 ??? id 작업이 숨겨진 입력이 있는지 확인하십시오 –

+0

Html posted ... – Hatem

답변

0

나는이 문제를 해결했다. 그것은 선택자와 관련이 있으므로 변경하려고합니다. 고맙습니다 모두

관련 문제