Introducing jqalert - The jQuery-empowered alert() replacement

by Jon 3/22/2008 4:59:00 PM

I'm releasing a beta build of something I've been working on called jqalert. It's basically a nice, skinnable modal dialog box that defaults to have a certain "fade-in" feel I wanted to have.

Here's the current project URL:

http://www.jondavis.net/codeprojects/jqalert/  

.. or on cachefile:

http://cachefile.net/scripts/jquery/plugins/jqalert/0.9/

I built this having been inspired by a few other similar libraries out there, including:

What sets jqalert apart is that it is a) specifically an alert() replacement, b) prefab'd to be functionally comparable to Visual Basic's MsgBox, which allows the user to set the title and the icon (and the buttons, too, but jqalert currently only supports OK), while c) also adding a lot of customizeability.

What does "specifically an alert() replacement" really mean, when other tools do the same basic thing? It's about the execution...

  • As quick and simple to use as possible: jqalert(message); or jqalert(message, title);
  • Predictable "windowing" appearance; universally recognizeable.
  • You get a titlebar.
  • You can drag the alert window around with the titlebar, for those "emergencies" where you might need to peek back behind the alert window, without closing out the message. 
  • You get an OK button.
  • The OK button claims focus, so that you can close it by just hitting spacebar or enter.
  • The OK button reclaims focus if it loses focus by clicking elsewhere in the alert window.
  • Modality blocks UI.

kick it on DotNetKicks.com

Currently rated 3.4 by 5 people

  • Currently 3.4/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags: , , ,

Pet Projects | Open Source | Computers and Internet | Web Development

Related posts

Comments

3/20/2008 3:21:27 AM

Paul Irish

An option you could consider is to override the default window.alert() function with this.. which would allow anyone to keep their existing ugly alert() code, but it would be caught with your improved dialog.

btw- very slick. nice work.

Paul Irish us

3/20/2008 5:41:04 PM

Jon

Well that's just a "documentation feature", all you have to do is: window.alert = window.jqalert; ...

Ha ha ... I thought as a system function that would surely throw an error but sure enough, it works. Documentation added.

Jon us

3/22/2008 12:46:23 AM

Razee Marikar

Seems like its something that's a feature already there in other JS frameworks like YUI (Yahoo! UI). I don't remember the link, but you will get it if you search for it.

Razee Marikar in

4/17/2008 9:28:02 PM

Ganesh

Nice plugin Jon. I am an avid jquery fan, and I like your plugin very much, but i guess i wont be using it at present, coz it sounds too heavy (in terms of size) for the what it replaces.

Ganesh us

4/18/2008 7:55:40 AM

Jon

Totally understandable. I still blush when I see the file size.

You should check out blockUI; it's a lightweight and cleaner aproach. jqalert was written for fun but, being somewhat of an experiment, it needs to be rewritten and simplified, not to mention the need to replace that dreaded Win98 look ..

Jon us

4/18/2008 8:36:08 AM

Jon

FWIW, minified at http://fmarcia.info/jsmin/test.html it shrinks to 12.6kb.

Jon us

Add comment


(Will show your Gravatar icon)  

  Country flag





Live preview

10/7/2008 9:25:24 PM


 

Powered by BlogEngine.NET 1.2.0.0
Theme by Mads Kristensen

About the author

Jon Davis Jon Davis (aka "stimpy77") is a software and web developer by day and a software and web enthusiast (geek) by night. He was recently a senior web engineer for the enthusiast division of a major magazine publishing company for nearly two years. He has been a programmer, developer, and consultant for web and Windows software solutions professionally since 1997, with experience ranging from OS and hardware support to DHTML programming to IIS/ASP web apps to Java network programming to Visual Basic applications to C# desktop apps.
 
Software in all forms is also his sole hobby, whether playing PC games or tinkering with programming them. "I was playing Defender on the Commodore 64," he reminisces, "when I decided at the age of 12 or so that I want to be a computer programmer when I grow up."
 
Jon is currently engaged in a short-term ASP.NET contract and is available for hire for short-term or permanent work in Phoenix or via telecommute.
E-mail me Send mail

Calendar

<<  October 2008  >>
MoTuWeThFrSaSu
293012345
6789101112
13141516171819
20212223242526
272829303112
3456789

View posts in large calendar

Pages

    Recent comments

    Authors

    Tags

    Disclaimer

    The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

    © Copyright 2008

    Sign in