i have a Zend Form and i would like to use jquery to do some ajax posting.
if ($this->getRequest()->isPost()) {
$data = $form->getValues();
$image_id = $this->usermedia->crop_image($userObj->user_id, $data);
}
the crop_image
saves the data:
$new_image_id = $this->getDbTable()->createRow($new_row_data)->save();
return $new_image_id;
if the form is posted then run a function and give me back an $new_image_id
.
all this happens in a modal window that loads a iframe with the form.
what i want is when i submit the form to grab that $new_image_id
from inside the iframe, close the modal window and place it on my original page
any ideas on how this can be done?
thanks
edit: