is it possible to have a link in a basic dialog and when you click on the link to have the dialog animate out before loading the new page into the browser?
Yes. Add a Listener for "click" to the dialog's Element (getEl())
In the handler, see if the event's target has a tagName of "a". If so, stop the event, hide the BasicDialog with animation, and set the document's href to the "a" element's href in the handler of the "hide" event.
Here's some code I've ripped from a dialog I'm working on...
First, set up an event handler (in my case it will deal with clicks on addresses in an east panel):
[code]
// event handler for when a past address is clicked
var addressClicked = function(e){
var a = e.findTarget(null, 'a'); // find the "a" element that was clicked
if (a) {
e.preventDefault();
ContactEditor.setAddress(pastAddresses[Number(a.href.split('$')[1])]);
}
};
....
[code]
Next, listen to your panel:
[code]
....
east = layout.add('east', new YAHOO.ext.ContentPanel(YAHOO.util.Dom.generateId(), {
autoCreate: true,
fitToFrame: true,
autoScroll: true,
title: 'Previous Addresses'
}));
Any URL's clicked in that panel (a tags) will end up triggering the event listener shown earlier and that will stop the URL from being followed. From there you can do whatever you want
I think a user would get pretty annoyed if clicking on a link waited for some animation to happen before being actioned. I wouldn't visit the site again. I'm impatient.