Form data missing when automatically submit the form


I want to submit a form(CActiveForm) automatically when a popup window is closed. But the form data is missing so it could not pass the form validation.

I use the following jquery function to enable the auto-submission:

<script type="text/javascript">



		modal: true,


			text: 'Ok',

			click: function(){





		close: function(evt, ui){






Could anyone help pls? Thanks

Are you sure that the submit action completes before the window is closed? Try putting a callback on the submit function, to see if submission is finalised.

The form has been submitted after the popup window is closed. And if I check a field value by

$("#parentFormId").submit(function() {

 alert(&#036;('#fieldID select').val());

 return true;


I could see the field value is there.