<?php use_helper('Javascript');?>
<div id="indicator">Data processing beginning</div>
<?php echo javascript_tag("document.getElementById('indicator').innerHTML = '<strong>Data processing complete</strong>';") ?>

<div id="indicator">Data processing beginning</div>
<?php echo javascript_tag(
  update_element_function('indicator', array(
    'content'  => "<strong>Data processing complete</strong>",
  ))
) ?>

<div id="item_list">hehe</div>
<?php echo form_remote_tag(array(
    'update'   => 'item_list',
    'url'      => 'user/create',
)) ?>
  <label for="item">Item:</label>
  <?php echo input_tag('item') ?>
  <?php echo submit_tag('Add') ?>
</form>

<div id="feedback"></div>
<div id="indicator">Loading...</div>
<?php echo link_to_remote('Upload batch', array(
    'update'   => 'feedback',
    'url'      => 'document/createbatch',
    'loading'  => "Element.show('indicator')",
    'complete' => "Element.hide('indicator')",
)) ?>