Last post Feb 09, 2011 10:51 AM by danjammil
Oct 06, 2005 12:17 AM|Willgart|LINK
but this doesn't works.
if I specifiy a function like: PageMethods.GetNewText('toto',myResultFct,
then I can retrieve the returned value, but its an async. call in this case.
thanks for your help.
Oct 06, 2005 06:32 PM|interactive|LINK
Oct 06, 2005 11:28 PM|Willgart|LINK
Nov 17, 2005 06:11 PM|buzzripper|LINK
Nov 22, 2005 02:50 PM|justncase80|LINK
I need to know how to make synchronous calls also. I realize that its called Ajax not Sjax for a reason, but it should still be possible. Sometimes its necessary!
Nov 22, 2005 04:32 PM|justncase80|LINK
Nov 23, 2005 11:04 PM|bleroy|LINK
Nov 24, 2005 07:36 AM|chep|LINK
What about old-fashioned blocking scheme (just guessing )?
lock = false;
res = null;
res = result;
lock = true;
Nov 24, 2005 06:40 PM|bleroy|LINK
Dec 01, 2005 03:07 PM|buzzripper|LINK
In Ajax.net they have synchronous calls - how do they do it?
I disagree strongly that asynchronous is just a 'different style' - it makes the code much uglier and harder to maintain. It forces you to do things like move local variables into page-level variables, and hence opens you up to the possibility that the state
on the client gets fouled up before the call returns, because the call is asynchronous. And what if I
is ugly enough, forcing a developer to make all Atlas calls asynchronously makes it even uglier.
Dec 01, 2005 06:12 PM|bleroy|LINK
_keyDownHandler = Function.createDelegate(
Dec 13, 2005 09:16 PM|delfion|LINK
How To Make Atlas Sync!!!!
Atlas = Ajax, I agree, Atlas is Async, but some times the Sync processing is necesary
I was use XMLHttp long time.
If you want become Atlas Sync. Change this lines in the ScriptLibrary folder
.open('POST',_effectiveUrl,true) by .open('POST',_effectiveUrl,false)
.open('GET',_effectiveUrl,true); by .open('GET',_effectiveUrl,false);
that's all, the last parameter is the Async Property of XMLHttp
pardon for my english
Dec 14, 2005 05:58 PM|bleroy|LINK
Please don't do that. Modifying the script library is not a good idea: you would have to reapply the changes every time you take an updated version of Atlas.
What you can do is create your own class and make sync a possibility from here, as I've suggested before.
Then again, please read my previous post. It's better to disable UI than to do sync processing because that can potentially put the browser in an unlockable state.
Dec 14, 2005 08:25 PM|buzzripper|LINK
Ok bleroy, I understand what you're saying about locking the browser etc., and I appreciate your knowledge on the subject. I'm sure it works, but to me your workaround of having to create delegates etc. is far from simple and just reinforces my basic point.
I also strongly reject the casual response to the key problem of page elements:
"...you shouldn't block the whole browser. What you should do is disable the pieces of UI that should remain untouched while the call is going on.. "
I submit that that's enormously difficult to do in a real-life, complex web page (which real-life pages tend to end up as). I may be using 3rd party grids/controls with limited client-side functionality, etc., there may have permissions logic that
determine what can/cannot be enabled that now may have to be pushed to the client, etc. And that's just a couple of examples.
So, I understand that blocking a single-threaded browser is a big deal, I just wish it seemed like there was a full appreciation of the impact of forcing the use of asynchronous calls.
Again, thanks for your expertise, I appreciate it.
Dec 14, 2005 11:33 PM|bleroy|LINK
You can usually put the UI elements you want to disable in a div and just disable the div although that may not work on all browsers. Most of the time, you'll want to disable active elements like inputs and buttons. Do you think that a cross-browser, declarative way
to disable all active elements within a given element would help?
If that element is the document itself, it becomes extremely easy to do, and the whole browser is not locked, just your page.
There is actually no way you can hide an asynchronous call and make it look synchronous. Only the reverse is possible.
Sorry. I really wish this would be possible (and if someone has a brilliant idea on the subject I'd like to hear it). It just isn't.
Jan 26, 2007 07:42 PM|StewMeyers|LINK
I completey agree with buzz on this... sometimes it is just difficult to implement a particular feature without a synchronous call. I am in that position now. Every ajax call up until now was fine asynchronously, but I could really use a synchronous feature
for one particular part of the application. I also can't understand why the ability wasn't put into asp.net ajax if really needed... as buzz stated, ajax.net and ajaxpro.net have had it a long time. I switched over to ms ajax, and now I have to jump through
hoops to figure out how to do a synchronous call.
If someone has a quick example on a synchronous call, I would really appreciate it.
Jul 05, 2007 11:18 PM|KaziManzurRashid|LINK
Oct 24, 2008 08:09 AM|Gaset|LINK
If some one needs a sync AJAX request, see jQuery.
Jun 17, 2009 10:18 PM|bc1016|LINK
Here is one I used:
Hope this helps.
Feb 09, 2011 10:51 AM|danjammil|LINK
Here's an article on synchronous Microsoft Ajax: (scripts included)
Hope that helps