I need some help with closing a tab. alt text

Catalogue Search is opened from the Home page with contentloader. Catalogue displays a grid (list) of items and each item can be opened in its own tab. From there you click on the button "Review Order" which opens a window in modal mode.

What I would like to do is when the user clicks on Place Order that the last action it performs is closing the tab Catalogue Search. That is the easiest approach as it will close all child tabs (items opened).

The neater solution would be to close all open catalog item tabs. So in this case I would have a tab for item SXA022P1 and a tab for item PLS3567Y etc. I looked at some other threads with similar request, but I can't get it to work. The Catalogue page has a static id CATALOGLIST.

Each catalogue item is opened in a new tab using Content Loader which uses URL from triggering Element. This is simply a link in the grid column. The "Link Attributes" is set to id="TAB-#ITEM_CODE#" class="fx-new-tab" rel="#ITEM_CODE#" title="Open in New Tab"

asked 08 Aug, 08:56

Ray's gravatar image

Ray
206319
accept rate: 11%

This looks pretty similar to this question: http://forum.tryfoexnow.com/osqa/questions/9520/disable-tab-based-on-item-value-fxp-3265 Did you have a chance to try it? Instead of the setDisabled() method you would have to call onCloseClick() to close the tab. If your catalogue tab always has the same ID you could just cycle through every open tab and close every one of them but the catalogue tab.

Can you share your env?

(10 Aug, 12:35) FOEX-SUPPORT FOEX-SUPPORT's gravatar image

I have tried that but not getting anywhere. The java console reports the error "Uncaught TypeError: Cannot read property 'items' of undefined. I have emailed login details and explanations.

(14 Aug, 04:35) Ray Ray's gravatar image

Thank you for the test case, we have provided you with the correct functionality to close the tab. A new plugin will be introduced in the next version to declaratively do this.

link

answered 2 days ago

FOEX-SUPPORT's gravatar image

FOEX-SUPPORT
4.2k15
accept rate: 32%

Thank you for your help. It works really well now.

(2 days ago) Ray Ray's gravatar image
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×8

Asked: 08 Aug, 08:56

Seen: 70 times

Last updated: 2 days ago

FOEX Links