Closing Tab Instances Or Single

Tested in my Online Tenant delelte cống phẩm Query Success function, turns out window.close() function won"t work due lớn Chrome Security feature which not allow cchiến bại the current window by JavaScript window.close().

Bạn đang xem: Closing tab instances or single

If you kiểm tra the message in the Chrome Developer Tool Console, you will find such message:

Scripts may cđại bại only the windows that were opened by it.

You could refere the same question in StackOverflow:

window.cthua & self.cthua vì not cđại bại the window in Chrome

A workaround now is redirect user khổng lồ another page rather than cthua the window, you could redirect user to lớn a notification page khổng lồ show "The items has been closed successfully" using window.location.href="PageUrl".

Thanks

Best Regards

Please rethành viên lớn mark the replies as answers if they helped. If you have feedbachồng for TechNet Subscriber Support, contacttnmff
microsoft.com. SharePoint Server 2019 has been released, you can clickhere khổng lồ download it.Click here khổng lồ learn new features. Visit the dedicatedforum toshare, explore & talk lớn experts about SharePoint Server 2019.

Xem thêm: Cách Viết Đơn Xin Xác Nhận Thông Tin, Xác Nhận Cư Trú Tại Công An


Wednesday, March 6, 2019 1:40 AM

All replies


*

*

0
Sign in lớn vote

Hi v k b,

Tested in my Online Tenant delelte tòa tháp Query Success function, turns out window.close() function won"t work due to lớn Chrome Security feature which not allow cthua kém the current window by JavaScript window.close().

If you kiểm tra the message in the Chrome Developer Tool Console, you will find such message:

Scripts may cthua trận only the windows that were opened by it.

You could refere the same question in StackOverflow:

window.cthua kém và self.cthảm bại vày not cthua kém the window in Chrome

A workaround now is redirect user khổng lồ another page rather than cthua trận the window, you could redirect user to a notification page lớn show "The items has been closed successfully" using window.location.href="PageUrl".

Thanks

Best Regards

Please remember khổng lồ mark the replies as answers if they helped. If you have sầu feedbachồng for TechNet Subscriber Support, contacttnmff
microsoft.com. SharePoint Server 2019 has been released, you can clickhere to tải về it.Cliông xã here to learn new features. Visit the dedicatedforum toshare, exploretalk to experts about SharePoint Server 2019.


Wednesday, March 6, 2019 1:40 AM
Community Resources
Follow Us
United States - English