Is it possible to redirect a user when closing a document in the web app viewer?
In particular, I have a left menu link to .pptx
documents located in the document library. When the X (close button within the web app)
is clicked, the user is shown the document's library.
This behavior is unwanted. I would like to return the user to the starting location.
The pptx web app viewer opens a url similar to this:
http://client1.mydomain.com/project11210/_layouts/15/WopiFrame.aspx?sourcedoc=/project11210/Shared%20Documents/mypowerpoint.pptx&action=default
As far as I can tell, there are no query string parameters for redirection. I have tried using a web part page viewer, but the url to the page is a normal aspx page.
If I have to write JavaScript, what would it look like?
Environment:
- SharePoint 2013 SP1 Enterprise farm
- Windows Server 2012 R2
- Office Web Apps Server 2013
This question is somewhat of a duplicate to (but slightly different):