Wednesday, 2 October 2019

HTML/JQuery: How to close browser tab automatically after word document download (ms-word:ofe|u|)?

In HTML, If i use following link in anchor tag:

a href = "http://gugla.com/maadu.docx" target="_blank"

It opens document by opening new tab, downloading and close new tab itself.

As we need to use document for editing on download so Sharepoint team has given following URL:

a href = "ms-word:ofe|u|http://gugla.com/maadu.docx" target="_blank"

This opens document in editing mode on all browsers in word; but but but when document is saved after editing in word;; we see that "Browser Tab remained open and we need to close it manually". enter image description here

Note: This link is present in iframe so i could not remove target blank as it will show "leave page stay on page" dialog which is also not required.

UPDATE: Created fiddle for my use case http://jsfiddle.net/qxhzdmu6/ The link is not actual document but situation is same when word opens enter image description here

then it forgets there is tab at background



from HTML/JQuery: How to close browser tab automatically after word document download (ms-word:ofe|u|)?

No comments:

Post a Comment