CakePHP ajax表单提交之前和完成将无法显示GIF动画

时间:2022-11-24 15:19:00

I"m using prototype I've tested ALL possibble scenarios, and my busy indicator WILL not show no matter what. I've cross browser tested no luck.

我正在使用原型我已经测试了所有可能的场景,而我的繁忙指示器无论如何都不会显示。我已通过浏览器测试没有运气。

<?php 
echo $ajax->submit('Submit', array('url'=> array('controller'=>'records',        'action'=>'add'), 'update' => 'ajax_div', 
'evalScripts' => true,
'before' => $this->Js->get('#busy-indicator')->effect('show', array('buffer' => false)),
'complete' => $this->Js->get('#busy-indicator')->effect('hide', array('buffer' =>   false))));
?>

<?php echo $this->Html->image('ajax-loader.gif', array('id'=>'busy-indicator')); ?>

1 个解决方案

#1


1  

Well. I finally got this working. The manual had no indication of this method but it works like a charm for prototype:

好。我终于得到了这个工作。手册没有这种方法的迹象,但它的作用就像原型的魅力:

<?php 
echo $ajax->submit('Submit', 
  array('url'=> array('controller'=>'records',
   'action'=>'add'), 'update' => 'ajax_div', 
   'evalScripts' => true,
   'loading' => 'Element.show(\'busy-indicator\')',
   'success' => 'Element.hide(\'busy-indicator\')'));
?>

#1


1  

Well. I finally got this working. The manual had no indication of this method but it works like a charm for prototype:

好。我终于得到了这个工作。手册没有这种方法的迹象,但它的作用就像原型的魅力:

<?php 
echo $ajax->submit('Submit', 
  array('url'=> array('controller'=>'records',
   'action'=>'add'), 'update' => 'ajax_div', 
   'evalScripts' => true,
   'loading' => 'Element.show(\'busy-indicator\')',
   'success' => 'Element.hide(\'busy-indicator\')'));
?>