2011-05-14 26 views
0

我使用的原型我已經測試過所有可能的場景,並且我忙的指示器不會顯示,不管怎麼樣我已經通過瀏覽器測試沒有運氣。 。CakePHP ajax表單提交之前,完成將無法顯示動畫gif

<?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')); ?> 
+0

我已經刪除了我的測試顯示圖像路徑:none; css .. – OldWest

+0

做那些陳述工作說alert()?這個問題似乎有兩個,首先是js c那麼所有的CSS都會對它的工作方式產生影響。 – Gevious

+0

很明顯,是測試過的alert()已經可以正常工作了... ...'before'=> $ this-> Js-> alert('hey you!'),... – OldWest

回答

1

好吧,我終於得到了這個工作手冊沒有這種方法的跡象,但它的工作原理像原型的魅力:

<?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\')')); 
?>