We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

How do I display user messages in an overlay instead of a separate page?

Development and Programming

ABDC's avatar
ABDC
71 posts
14 years ago
ABDC's avatar ABDC

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.

       
ABDC's avatar
ABDC
71 posts
14 years ago
ABDC's avatar ABDC

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;
    });
   });
       
Shane Eckert's avatar
Shane Eckert
7,174 posts
14 years ago
Shane Eckert's avatar Shane Eckert

Hello André Brocatus,

Sounds like you are making progress.

I am going to move this over to Development and Programming where you will get some more eyes on this and some more ideas.

Cheers,

       
ABDC's avatar
ABDC
71 posts
14 years ago
ABDC's avatar ABDC

OK, thanks; sorry for the wrong section. I’d love it if anyone had any pointers…

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.