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.

});<br />

// Fades out the modal window<br />

fx.boxout();<br />

// If this is a new event, adds it to<br />

// the calendar<br />

if ( $("[name=event_id]").val().length==0<br />

&& remove===false )<br />

{<br />

fx.addevent(data, formData);<br />

}<br />

},<br />

error: function(msg) {<br />

alert(msg);<br />

}<br />

});<br />

$(".edit-form a:contains(cancel)")<br />

.live("click", function(event){...});<br />

});<br />

CHAPTER 9 ■ PERFORMING FORM VALIDATION WITH REGULAR EXPRESSIONS<br />

Now save these changes, load http://localhost/ in your browser, <strong>and</strong> then create a new event with<br />

bad parameters using the modal window form (see Figure 9-24).<br />

341

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

Saved successfully!

Ooh no, something went wrong!