javascript - Button action is not posting the form data to Controller in play framework -


i have written jquery function opening form in modal dialog.

i have added button , when user performs action on button calling controller.

but form data not getting posted in controller.

please let me know if had missed anything. below code.

html:

<div id='rejectjobdialog' title='alert: reject job'>    <form method="post" enctype="multipart/form-data">       <label>jobid</label>       <input lang="en" id='jobid' type="text"></input>       <br>       <b>why want reject this?</b>        <textarea lang="en" id='comments' name='comments' cols="40" rows="5"></textarea>       <br>    </form> </div> 

js:

 $(function() {      $("#rejectjobdialog").dialog({          autoopen: false,          modal: true,          title: 'you reject job',          width: 400,          height: 400,          closed: false,          cache: true,          buttons: {              reject: function() {                  $(this).dialog("close");                  var comments = $("#comments").val();                  if (comments === '') {                      alert("please enter comments reject");                  } else {                      action: '@{weapplicationcontroller.rejectwejob()}',                       alert("we job rejected");                  }              }          },      });      $("#rejectjob").click(function() {          $("#rejectjobdialog").dialog("open");      });  }); 


Comments

Popular posts from this blog

Fail to load namespace Spring Security http://www.springframework.org/security/tags -

sql - MySQL query optimization using coalesce -

unity3d - Unity local avoidance in user created world -