[SOLVED] How to close a tab in New menu?

Hi All, parent.del_aba_td(‘item_192’) is not working on new Menu.

Regards.

@Danilo_Lima is working for you? I can’t close a menu tab with parent.del_aba_td(‘item_192’) like previous menu.

Regards.

Dear @gbillot3,

Could you share with us the complete code used to perform the action you refer to in the first topic, please?

Best regards!

It is a Javascript button with the code I sent you. parent.del_aba_td(‘item_192’)

The item number is the one of the menu.

This works perfect in the old menu.

Regards

Dear @gbillot3,

There is another function that serves the new menu

you have to put “id_tab_” before the tab name

Example:

parent.contextMenuCloseTab(‘id_tab_item_192’);

1 Like

Thank you very much @yuri_esteves

It’s working now with that code.

Hi @gbillot3.

Is this code working right now for you?
I tried to create a button and placed exactly your code for the button.
Obviously, I changed the id of the tab and I checked if the id really exists. It does.

In my case, the click on the button doesn’t close the tab of the new menu. It only shows me the “OK” button an when clicking on it, I’m lead back to the last grid position.

Thanks for letting me know if it’s still working on your side.

Kind regards

Hi @mc73. Yes, it’s working. In a Javascript button with this code:

parent.contextMenuCloseTab(‘id_tab_item_9’);

I’ve just been tested on the last version menu_911 from SC samples apps

Regards.

Thanks @gbillot3 for your reply!

I just tried it on the sample, too and I get no reaction on clicking the button. Find here a screenshot of my button. Do you maybe recognize something I’m missing? I also tried a PHP version, find the code on another screenshot. The menu item "item_12 does exist

!

Thanks

It’s working wiht PHP or JS button.
Try to replace the quotes to doble " "
if you copy and paste the code, retype the single or double quotes.

Is the only thing could be the problem. Clean the browser cache or try in incognito mode.

Regards.

1 Like

The quotes were the point! After copying I have replaced them now, and it works.
Thank you so much for your support!
Regards