Stop DispEx Redirecting in SharePoint
Posted on Sunday, 30 August 2009 12:09Ever tried to use the DispEx javascript function in SharePoint to edit a codument, but it causes a page refresh after? Here's how to stop the nonsense!
When you call the DispEx function in SharePoint, to edit a document, as soon as you close the office application, the SharePoint page "refreshes" (it actually re-routes back on itself.
Ths is fine for most people, but in my bespoke application, it was something of a problem as I did not want a reload or a refresh.
To achieve this, you just need to add the following code:
<script type="text/javascript">g_varSkipRefreshOnFocus = true;</script>
Hope you find this as useful as I did.