views:

154

answers:

1

I'm developing an application ased on zend framework, and the problem that it is giving to me is this, when i echo zend file element like this:

<div id="add_video" title="Add Video">
    <?php echo $this->form->video_title;?>
    <?php echo $this->form->video_thumb;?>
    <?php echo $this->form->video_video;?>
</div>

And i have this in header:

<script type="text/javascript" src="/js/jquery-1.3.1.js"></script>
<script type="text/javascript" src="/js/jquery-ui-personalized-1.6rc6.js"></script>
<script>
  $(document).ready(function(){
    $("#add_video").dialog({ autoOpen: false, buttons: { "Ok": function() { $(this).dialog("close"); }}});
  });
</script>

When sumited zend framework doesn't find the file, i do print_r($_FILES), and nothing in the array, when i remove the javascript it works again ... Same example works when not using zend framework.

A: 

You've probably figured this out by now. But yes, jqueryui's modal dialog generates the html needed for display and appends it to the end of the document. So you would need to do either of the following:

  1. Have your entire form displayed inside the modal dialog
  2. Use the "OK" button's return function() to pull all of the input elements inside of the dialog using $(this).children('input').each() and append them to the main form
Mark