0

how can i send a Synchronous request to server

asked 2013-04-26 08:39:55 +0800

gaoyuanjun gravatar image gaoyuanjun
3

updated 2013-05-01 05:53:15 +0800

sjoshi gravatar image sjoshi flag of India
3493 1 8
http://zkframeworkhint.bl...

just like

jQuery $.ajax({
                async:false;//use Synchronous Ajax request
                type: "POST",
                url: "some.php",
                data: "name=John&location=Boston",
                success: function(msg){
                condition=msg;
                }
            });

when sending a request to server ,the webbrowser will be locked, and user can operate nothing.

delete flag offensive retag edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2013-05-01 05:18:07 +0800

rdgrimes gravatar image rdgrimes
735 7

There is, in the zAu object (see link), the ability to define an ajaxSettings map before issuing a send. Unfortunately, it is horribly documented. Well, actually, it's not documented at all as to what is valid in this map. But, since ZK heavily uses its own version of jQuery, I would think it well worth the effort to set ajaxSettings to include {async: false} and then send your request to the server via one of the sendXxx methods.

I'm betting that will do the trick.

Ron

link publish delete flag offensive edit
Your answer
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow
1 follower

RSS

Stats

Asked: 2013-04-26 08:39:55 +0800

Seen: 21 times

Last updated: May 01 '13

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More