Topic: xajax.call

Hello,

In older versions of xAjax i was using the following way to call a xajax function async...

xajax.call(func,
{
  mode:'synchronous',
  parameters:[params]
}
);

but it doesnt work for the new version of xAjax... so i need help to make it work...

Can somebody help me? how can i do an async call to a xAjax function in javascript?

Any help will be appreciated!

Regards,

Re: xajax.call

this project seems to be dead ;(
hehe

Re: xajax.call

Well, it's not really dead. I'll look at the code and get back to you.

If you ever stop learning you may as well dig a hole, crawl in and pull the top over yourself.

Re: xajax.call

wow...

ok big_smile

this method... "xajax.call" was working in older versions, after updated to 0.6 isnt working... i tried to search if it was modified... like changed the way to use it... but no success sad

waiting happy for an answer smile

ty

Re: xajax.call

I have searched the forum for "xajax.call" and the only reference is your post.

I find it in the xajax core js but it has no sync or async reference.

Could you post the code you are using please?

Thanks

If you ever stop learning you may as well dig a hole, crawl in and pull the top over yourself.

Re: xajax.call

Yes... one moment please... i'll prepare it for u with older xajax

7 (edited by cebasso 2012-03-27 7:54:54 PM)

Re: xajax.call

Hey there,

Follow the COMPLETE (including xajax 0.5) code...

http://www.skyimport.com.br/xajax_call.zip

Its using xajax 0.5 and working sync calls...

Can you take a look?

ty

Re: xajax.call

Ty,

I emailed you earlier.

The solution is to use xajax.request() as xajax.call() no longer exists in 0.6.

Example JS:

  xajax.request({xjxfun:'func1'},
    {
    mode: 'synchronous',
    parameters:['We are calling the func1 and waiting...']
    }
  );

The first parameter defines the function to call.
The second provides other parameters - mode and parameters.

I think this is the same function called when you call for a registered function but not real sure.

Ed

If you ever stop learning you may as well dig a hole, crawl in and pull the top over yourself.

9 (edited by cebasso 2012-03-28 2:31:05 AM)

Re: xajax.call

Hey Ed,

I saw the email now, and as i said, i really don't know how to thank you!

:))))))))))))))))))))))))))

Thank you very much!

:D :D :D

Is a great way to call sync and async xajax funcs no matter the default mode...

Thank you againn hehe

Best Regards!
Cheers!!

Re: xajax.call

To clarify what happened here...

xajax.call was already *marked* as deprecated in xajax 0.5. We kept the function in 0.5. to make upgrading from the 0.2.x branch easier. In xajax 0.6 we dropped all deprecated function to shrink and optimize the core.

The new syntax is xajax.request(), for instance:

xajax.request({xjxfun:'my_php_function'},{parameters:['argumentone','argumenttwo']});

Re: xajax.call

q_no,

Thanks for clearing that up...

Ed

If you ever stop learning you may as well dig a hole, crawl in and pull the top over yourself.