Is it possible to display the user- and error messages, the ones with the special build in templates, in an AJAX overlay instead of o a new page? I searched for a plugin or extension that does that but it does not seem available.
I am looking to build it myself in jquery; but I would need some pointers on how to intercept the url for the error message, or how to control the redirect from the loaded page.
Simply using for example /?ACT=10 as the url for the logout page I can load it in an overlay using query, but what is the list of all the errors that I then need to check? and how can I still use their redirects?
Any help appreciated.
I have it working for the logout, because that uses a HREF that I can read.
I do not need the redirects after all, because they are basically a redirect to the homepage, the logging out happens before, so I do not need the redirect, because in fact I want to stay on the same page, so a refresh is sufficient.
I just need to intercept the (urls of the) actions of the form buttons then; So how would I go about that?
for anyone interested this is the query i use; the messages are wrapped in a div#overlay, but also in a usable html page should the javascript fail.
$(document).ready(function() {
$('a#login').live('click',function() {
$('#overlaycontainer').load('{path="site/login"} #overlay');
return false;
});
$('a[href*="ACT"]').live('click',function() {
$href=$(this).attr('href');
$('#overlaycontainer').load($href+' #overlay');
setTimeout("location.reload(true);",'1000');
return false;
});
});Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.