Thursday, August 4, 2016

Auto-Refresh a SharePoint Page


 Follow the following steps to Auto Refresh a Page

 1. Go to the corresponding page and edit it. Ensure that you have the necessary rights & permissions for the same.

2. Add the Web Part to your page

 3. Go to “Media and Content” Category > Content Editor Web Part and select the suitable option from the dropdown for “Add Web Part to“. In our case, we have chosen "Header" 

 

Web Part



4. Select "Edit Web Part" from drop down


 

5. Update following settings –

 

 ● Select "Refresh the Web Page" for Title

 

 ● Select "None" as the Chrome Type

 

6. Click OK

 

7. Next, click section "Refresh the Web Page" to add script to the webpage. You will see a cursor in the content area

 

8. In the content area, go to Editing Tools > Format Text and choose "Edit HTML Source" from the HTML dropdown



Edit HTML Source

 

 

 9. Type following JavaScript code in HTML source

 

<script type="text/javascript" language="javascript">

var reloadTimer=null;

var sURL=unescape(window.location.pathname);

 

function setReloadTime(secs)

{

if(arguments.length==1)

{

if(reloadTimer)clearTimeout(reloadTimer);

reloadTimer=setTimeout("setReloadTime()", Math.ceil(parseFloat(secs)*1000));

}

else

{

reloadTimer=null;

location.reload(true);

windows.location.replace(sURL);

}

}

setReloadTime(30)

 

 </script>​​

 By using this script, page will reload in every 30 seconds.

 

Thank you very much

          Fahadullah Karimi

         SharePoint Specialist

How to Add/Delete Links in Top Link Bar in SharePoint 2013 Configure Apps for SharePoint 2013

No comments:

Post a Comment