In the calls to ajax you can supply an anonymous function as callback. So,
when the ajax request completes, the callback will be executed. Your code
for the next line should be written within the callback.

Eg: (Untested)

@("#bt1").click(function() {
$.ajax({
url: "myUrl",
complete: function() {
  $("#bt2").click(function() {
    $.ajax

u get the idea

-GTG


On 7/24/07, tuliopaiva <[EMAIL PROTECTED]> wrote:


Hi!

I have 3 buttons (id's "bt1", "bt2" and "bt3"), and each one has a
onclick funcion that is a ajax function. I want to execute this code:

1     $("#bt1").click()
2     $("#bt2").click()
3     $("#bt3").click()

but to execute the line 2, the line 1 must have finished the
execution, and the line 3 shoud be executed when the line 2 finished
(all funcions are ajax functions).

How can I do this???

Thanks.

[]'s


Reply via email to