Mailinglist Archive: yast-devel (246 mails)

< Previous Next >
[yast-devel] WebYaST: AJAX callbacks, chaining AJAX calls
  • From: Ladislav Slezak <lslezak@xxxxxxx>
  • Date: Mon, 31 Aug 2009 14:57:01 +0200
  • Message-id: <4A9BC89D.8020602@xxxxxxx>

Hi,

in the services plugin I needed to call an AJAX function (current status)
when another AJAX call is finished (start/stop a service).

I found that remote_function and link_to_remove provide before and after hooks.


Example:

Show a progress indicator while remote call is in progress:

link_to_remote ..., :loading => "$('#progress').show()",
:complete => "$('#progress').hide()"


:complete can be also used to chain another AJAX call:

link_to_remote ..., :complete => remote_function(:update => ...)

See link_to_remote documentation for more details.


I hope this helps someone else...


--

Best Regards

Ladislav Slez√°k
Yast Developer
------------------------------------------------------------------------
SUSE LINUX, s.r.o. e-mail: lslezak@xxxxxxx
Lihovarsk√° 1060/12 tel: +420 284 028 960
190 00 Prague 9 fax: +420 284 028 951
Czech Republic http://www.suse.cz/
--
To unsubscribe, e-mail: yast-devel+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: yast-devel+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages