Form API submit with AJAX removes wrapper element? I'm using the Form api to submit with ajax which works once, but once it's happened the wrapper element has also been replaced by the new ajax content. How can I make sure the content get replaced, but the wrapper element stays there so it can be replaced again?

$form['submit'] = array(
  '#type' =&gt; 'submit',
  '#value' =&gt; 'submit',
  '#ajax' =&gt; array(
      'callback' =&gt; 'fung_filter_form_callback',
      'wrapper' =&gt; 'view-cont',
      'method' =&gt; 'replace',   
) 


For now I've got a workaround by returning the same wrapper in the ajax content, but this seems a bit strange - any ideas?
If you don't want to 'replace' element with id 'view-cont', use another 'method', like:

'method' =&gt; 'append',


And if you in fact want to replace it, modify fung_filter_form_callback to make it return div with that ID again - that way you will replace original div with another div of the same ID, and will be able to repeat that process.