after_action_login()

A place for users and developers of the Xataface to discuss and receive support.

after_action_login()

Postby wisni1rr » Fri Apr 13, 2012 12:15 pm

Code: Select all
     function after_action_login(){
     echo "<script>
      alert('This is a popup message');
      </script>";
}


the code above is part of my ApplicationDelegate.php.

My problem is that after the alert box has displayed and the user clicks ok to close the window I get this error:

Warning: Cannot modify header information - headers already sent by (output started at .../conf/ApplicationDelegate.php:34) in .../xataface/Dataface/AuthenticationTool.php on line 281

Any ideas?
wisni1rr
 
Posts: 107
Joined: Mon Feb 13, 2012 9:03 pm

Re: after_action_login()

Postby shannah » Fri Apr 13, 2012 12:31 pm

The action_after_login() trigger is fired after successfully logging in. You shouldn't be outputting anything here. You could put a redirect here, or other book-keeping stuff... but nothing that is written to the browser.

If you want to add Javascript to a particular page you'll want to look at blocks and slots rather than triggers.

-Steve
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm


Return to Xataface Users

Who is online

Users browsing this forum: No registered users and 2 guests

Powered by Dataface
© 2005-2007 Steve Hannah All rights reserved