02.06.2013 Views

Pro PHP and jQuery by Jason Lengstorf.pdf - Computer Science ...

Pro PHP and jQuery by Jason Lengstorf.pdf - Computer Science ...

Pro PHP and jQuery by Jason Lengstorf.pdf - Computer Science ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

260<br />

CHAPTER 7 ■ ENHANCING THE USER INTERFACE WITH JQUERY<br />

});<br />

// Loads the event data from the DB<br />

$.ajax({<br />

type: "POST",<br />

url: processFile,<br />

data: "action=event_view&" + data,<br />

success: function(data){<br />

fx.boxin(data, modal);<br />

},<br />

error: function(msg) {<br />

modal.append(msg);<br />

}<br />

});<br />

Save this code, reload http://localhost/, <strong>and</strong> click an event title to see the modal overlay <strong>and</strong><br />

modal window fade in (see Figure 7-5).<br />

Figure 7-5. The modal window with an overlay to help draw the focus

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!