Exit in dynamic tree menu not redirecting correctly

Hello,

I have a tree menu and am using the onLoad event to dynamicaly create the menu. The problem I have is making a menu item to exit. See the following code.


sc_appmenu_add_item('treemenu_home','item_1','','{lang_menu_exit}','index','','delete2_32.png','','exit');

The code kinda works but it won’t leave the app and shows the redirected app in the main window of the menu. I’ve tried all the targets and _parent, which is supposed to replace the window, just shows it in the iframe. I tried using exit as a target, seen in another post, but it still shows the redirected app in the main window of the menu.

I want it to completely exit and go to the index page you see there in my parameters. I tried using the regular menu function of tree menu and created an exit item with exit as target and app link to index yet it doesn’t appear, probably because of the menu reset macro in the onLoad event. I tried _parent, parent, index_parent, exit, leave, index_exit, index_leave, etc… and it’s not doing what it is supposed to.

Hello,

Please contact our support regarding this issue. Our chat is active on workdays from 8:00am to 6:00pm (GMT -3), and our ticket system is always available.

regards,
Bernhard Bernsmann

In your code: replace “exit” with “leave” … (“Leave” ist in the menu settings the target for exit menu).

As I explained in the OP I’ve tried leave and it doesn’t leave. It just displays the redirected page in the iframe of the menu. I want it to completely leave the menu and replace the window with the page set in redirect.

Do not know if you are still looking for an answer. But here is something I finally hacked up which will log somebody out and rebuild the menu after they are logged out.

  1. Create a Blank application.
  2. In the ‘onExecute’ event, put the following code in it.

sc_reset_global ([usr_login], [usr_email]);
sc_reset_apl_status();
echo ‘<script>window.parent.location.reload();</script>’;

  1. Make sure the globals are set to only Session and Out.

Then you just need to put a ‘Logout’ entry in your menu that points to your Blank application.

Nick