Alpha Software is focused on enabling developers to create robust, data-driven business applications that run on any PC, Tablet or Smartphone in the fastest, most efficient and cost-effective manner possible.

Share this blog:

Tuesday, January 04, 2011

How to write custom Ajax callbacks in Alpha Five

When you're building a Web application, you might encounter a tricky situation when you want to prompt your end user for confirmation of an action. This involves writing a custom Ajax callback. But it also involves the client-side and server-side, which means you have to break the Ajax callback into multiple callbacks.

To help you get out of this jam, Selwyn takes an in-depth look at writing custom Ajax callbacks. To demonstrate, he put together a series of videos that show how a record in the Grid can be deleted. Before the record is deleted, a callback is made to the server to see if the end user is allowed to delete the record.

If the end user is authorized, then custom SQL commands are executed using AlphaDAO. You'll then see how to prompt the end user for confirmation after it has been determined that the end user is allowed to delete the record.

As you can see, there's a constant back and forth between client-side and server-side. Anything that's done on the server-side is done in Xbasic, and anything that's done on the client-side is done in JavaScript. Watch the videos to see the Xbasic and JavaScript behind it, how the callback is divided, and how the confirmation prompt is executed on the client-side.

Part one















Part two















Part three














Part four
















Part five
















Part six

















Part seven

0 comments :

Related Posts Plugin for WordPress, Blogger...