O'Reilly logo

YUI 2.8 Learning the Library by Dan Wellman, Daniel Barreiro

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Working with Dialogs

In this section we'll add an AJAX-enabled Dialog box that will let visitors rate either of the images. Using Dialog is very similar in many ways to using the Panel. The underlying markup for Dialog follows the same SMF, and the constructors are also very similar.

One of the benefits of Dialog over Panel is that you can send and receive data asynchronously between the Dialog and an application running on the server. This makes use of all of the AJAX facilities provided by the YUI with very little intervention from us.

We'll also write the PHP code that will carry out the rating request. Like the last time we looked at an AJAX application with the YUI, we need a full web server environment for this example to work correctly. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required