Isnor Creative
Isnor Creative Blog
Ruby, Ruby on Rails, Ember, Elm, Phoenix, Elixir, React, Vue

Mar 29, 2009

Do Or Dialog

A simple alternative to standard javascript confirms

Features:

  • Easy to customize css and image to produce custom dialog boxes
  • Uses Prototype and Scriptaculous

How It Works:

<a href='http://isnorcreative.com' onclick='return do_or_dialog(this,"Are you sure?")'>Click Me</a> - Gets the href attribute from the element passed in first argument - Appends a pseudo “modal window” - static-positioned gray box, full height and width, z-index 999 - Modal window has a dialog box inside of it with your message and yes / no buttons - The “No” button removes the pseudo-“modal window” - The “Yes” button redirects to the page specified by href

Get it:

git clone git://github.com/gordonbisnor/do_or_dialog.git

Gordon B. Isnor

Gordon B. Isnor writes about Ruby on Rails, Ember.js, Elm, Elixir, Phoenix, React, Vue and the web.
If you enjoyed this article, you may be interested in the occasional newsletter.

I am now available for project work. I have availability to build greenfield sites and applications, to maintain and update/upgrade existing applications, team augmentation. I offer website/web application assessment packages that can help with SEO/security/performance/accessibility and best practices. Let’s talk

comments powered by Disqus