Flash messages or notification messages are very essential part of every update/edit or delete operations. We either use ajax update messages like “You account has been updated” or “Your photo has been successfully deleted”

Here, a new plugin of jQuery can be used to display the flash messages like twitter. (see twitter’s settings page)

I added some more functions to this plugin to display the notification in different context, say information, warning or error message. The function showflash(‘message here’); can be used for this purpose. Second parameter is the type of message. For example, showflash(‘Error in deleting file’, ‘error’) OR show_flash(‘Email address entered is invalid’, ‘warning’)

If you use sessions to save flash message , for example in codeigniter $this->session->set_flashdata(‘message’,’hello’); you can use this plugin to display them by adding a php code in the footer (or header) of every page

session->flashdata(‘message’) != ” ) : ?>

Here you can download the full source code: http://www.sajithmr.me/downloads/jbar.zip

Screen shot 2009-12-27 at 11.30.12

Thanks

Sajith