Roar - Notifications (v1.0)

Project Roar - Notifications Showcase Roar is a notification widget that streamlines incoming messages, such as updates or errors, without distracting the user from their browser experience or breaking their work-flow by displaying obtrusive alerts. Roar is inspired by Growl, the notification system for Mac OS X and is realised with MooTools.

Showcases:

Showcase “Random Alerts”

Random notifications for all 4 corners of the document.

The Action Happens Here

JavaScript & MooTools

window.addEvent('domready', function() {
 
	/**
	 * You usually reuse ONE instance.
	 * The 4 instances we'll reuse here represent different options.
	 */
	var roars = [
		new Roar(),
		new Roar({
			position: 'upperRight'
		}),
		new Roar({
			position: 'lowerLeft'
		}),
		new Roar({
			position: 'lowerRight'
		})
	];
 
	/**
	 * CSS selector to get the 4 links and iterate over them
	 */
	$$('#demo-links a').each(function(anchor, i) {
 
		/**
		 * Hey, now I can throw random messages at the user!
		 */
		anchor.addEvent('click', function(el) {
 
			/**
			 * I take the index of the element as roar instance index.
			 */
			roars[i].alert(
				[
					"You've got mail!",
					"News published »Feel the lion roar!«",
					"1000 visitors tracked today",
					"Whats that strange text here?",
					"Try to read that!",
					"Look ma, without sense!",
					"No Error occured! Thank you for listening!"
				].getRandom(),
				[
					"Lorem ipsum laudem labore ex usu. Quo an antiopam repudiandae. Mei ex saepe possit molestie. Novum habemus nominavi pri id. Ad erat vivendo duo, dictas saperet scriptorem id vix, duis quaeque expetenda ex per.",
					"Tia helpi proto nomial u, nek ro eligi kunigi. Kuo vo sepen neniaĵo malprofitanto, on olda vavo ator ebl. Ind filo veki supersigno de. Neigi akuzativo por ie.",
					"Kaj jo miria posta itismo. It sia deka zorgi pseudoafikso, jesi kvanta da sub.",
					"Periodicos excellente publication non tu, de del toto latente religion. Que tu mundial traduction connectiones.",
					"Por is enen decilitro antaŭmetado. Ki pri egalo ologi alikvante, tioma iufoje monatonomo ko iel. Frida negativaj kvadriliono o tra, hura brosi respondo ali mf. Ali ec kaŭ duonhoro alternativo, log lo timi mikro, ato po nenia postpostmorgaŭ..",
					"Tot na malju neskolk. Es sxto varijm pridijt des. Sam na sport navestib, morkva jazika cxistju oni mi. Mne bolsx hcejm sxuflad ku. Klet nesxto to mne.",
					"Actually you should write some more useful in here, these are just word bits to fill the lines!"
				].getRandom()
			);
			return false; // cancel the click
		});
 
	});
 
});

XHTML Markup

<ul id="demo-links">
	<li><a href="#">Notification upper-left</a></li>
	<li><a href="#">Notification upper-right</a></li>
	<li><a href="#">Notification lower-left</a></li>
	<li><a href="#">Notification lower-right</a></li>
</ul>

This example and the accompanying sources/assets are © 2008-2009 by Harald Kirschner and available under The MIT License. For debugging and profiling the scripts and their markup download Firefox and use addons like Firebug and Web Developer Toolbar.

Share it: Stumble it!Digg This!del.icio.us (129 Posts: )

discussion by DISQUS 61 Comments

Please use the support forums for discussing the project, asking questions or posting bug-fixes!

Sort:
Comments 1 – 20 of 61:
  • reply
    Avatar
    al-bwoi
    said 2 years ago (1 Point)
    i love your roar notification widget. !!! i could kiss you!!!!!! lol. I cant wait for the update!!
  • reply
    Avatar
    digitarald Site Owner
    said 2 years ago (1 Point)
    Support and discussions moved to http://digitarald.de/forums/. If you already commented it here, please repost your question or bug report in the forum to get support.
  • reply
    Avatar
    said 2 years ago (1 Point)
    thank you admınn
  • reply
    Avatar
    said 2 years ago (1 Point)
    Got it working. Nice thing, gonna mention it on www.apfelkuh.de and I would love to trackback it, but actually i dunno where to get the trackback url :P I will just try wordpress default /trackback..
    maybe you could pay me a visit and post it ;)

    http://www.apfelkuh.de/blog/34...
  • reply
    Avatar
    said 2 years ago (1 Point)
    actually, doesnt work for me. I just have to figure out how to implement because the snippet isn't working.
  • reply
    Avatar
    Mustafa Akcakaya
    said 2 years ago (1 Point)
    Sometimes, when the message appeared, scrolls are appearing too if page content less than render area. it happens at FF, because FF doesn't show the scrolls if page content fits the area
  • reply
    Avatar
    Henry
    said 3 years ago (1 Point)
    Hi Harald, have you ever worked with Roar to show partly above a Flash object . Had a short look at your CSS and the z-index, position values in combination with flash´s wMode setting to "transparent" it should work ?! But it doesnt for me. Is it possible in general Any idea ? Great work btw
  • reply
    Avatar
    Ana
    said 3 years ago (1 Point)
    I can't seem to make it work with the code you use! Nothing shows up... :( Am I missing something here?
  • reply
    Avatar
    alberto
    said 3 years ago (1 Point)
    How could i make a confirmation box with roar?? may be possible?
  • reply
    Avatar
    alberto
    said 3 years ago (1 Point)
    how could I fire growl.smoke when page loads??
  • reply
    Avatar
    Javier
    said 3 years ago (1 Point)
    Hola amigo!

    Como veo es un poco complicado que los bordes en IE sirva. Por lo tanto, si se coloca una imagen de fondo como lo haria.

    Gracias!
  • reply
    Avatar
    said 3 years ago (1 Point)
    Thanks a lot for ROAR.
    I may need it for a project I'm currently working on for my Rodizio Restaurant.
    I'm trying to get my own browser based POS system running via WLAN.
  • reply
    Avatar
    Rusty Klophaus 1 Point
    said 3 years ago (1 Point)
    For those interested in different notification API's, one alternative is Stitcho.com (http://www.stitcho.com).

    Stitcho is a notification platform that allows web applications to send alerts through the internet to be displayed on a user's desktop, with clients for Windows and Mac.
  • reply
    Avatar
    said 3 years ago (1 Point)
    tthank youu
  • reply
    Avatar
    Doug
    said 3 years ago (1 Point)
    Is the demo broken? I'm on the Random Alerts page, and nothing happens when I click any of the four corner links. Maybe I'm just missing something...

    Thanks
  • reply
    Avatar
    Peter
    said 3 years ago (1 Point)
    Great work!
  • reply
    Avatar
    Peter
    said 3 years ago (1 Point)
    Very nice script, keep up your great work, Harald.

    I like to much Update Ticker variant, is it possible to add a "loop" in it (show notifications in order (not randomly)) and when last item is showed start it showing again..? Is it difficult to implement?

    Another great thing would be to have the possibility to read messages to show remotely via Ajax, from database using simple php file which queries database for example..

    Thanks in advance for your replies,

    Best regards and sorry for my english - i'm italian.
  • reply
    Avatar
    ben delaney 1 Point
    said 3 years ago (1 Point)
    This is nice. I noticed you have a "centered position" listed as a planned feature... any word on when we might expect that.

    Thanks again for all the awesome tools.
  • reply
    Avatar
    said 3 years ago (1 Point)
    thanxx
  • reply
    Avatar
    said 3 years ago (1 Point)
    Great JavaScript tool. Thanks for this.
Comments 1 – 20 of 61:

Post your comment

Please use the support forums for discussing the project, asking questions or posting bug-fixes!


Internet Consultant & Contractor

I'm available to combine forces with you and your team to find the most simple, elegant and convenient web solutions . I await your call.

If you just like my work and want to say Thank You, donate via PayPal or Amazon Wish List.

Developer Resources & Tools