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 |
Jump to:
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
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.confirmfunction.#2
That looks nice, where should I put the code, and plug in files?
#3
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.