Show warning "You're leaving site" in lightbox window?

-Shaman- - July 11, 2009 - 14:24
Project:External Links
Version:6.x-1.x-dev
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:won't fix
Description

I have an idea to show user prompt in lightbox/thickbox window that would look nifty 'n' sexy, how do you think about that is this feasible to do?

#1

quicksketch - July 11, 2009 - 19:36

External Links uses the standard "confirm" JavaScript function. If you'd like, you can override this with a better function that functions differently.

I don't personally use Lightbox, but say you wanted a dialog box like: http://abeautifulsite.net/notebook_files/87/demo/

You could make External Links use that confirmation box by using the following:

window.confirm = function(message) {
  jConfirm(message, 'Please confirm', function(result) {
    return result;
  });
};

The same thing could be done with LightBox, just set a new window.confirm function.

#2

-Shaman- - July 11, 2009 - 20:03

That looks nice, where should I put the code, and plug in files?

#3

quicksketch - July 25, 2009 - 04:03
Status:active» won't fix

You'll have to figure that out yourself, the issue queue is for features/bug reports and not for requests about how to write custom code.

 
 

Drupal is a registered trademark of Dries Buytaert.