{"id":47,"date":"2011-05-16T22:06:20","date_gmt":"2011-05-17T05:06:20","guid":{"rendered":"https:\/\/mmman.itgroove.net\/?p=47"},"modified":"2023-02-24T21:47:09","modified_gmt":"2023-02-24T21:47:09","slug":"adding-an-auto-refresh-content-editor-web-part","status":"publish","type":"post","link":"https:\/\/regroove.ca\/archive\/2011\/05\/16\/adding-an-auto-refresh-content-editor-web-part\/","title":{"rendered":"Adding an Auto-Refresh Content Editor Web Part"},"content":{"rendered":"<h3>The Challenge<br \/>\n<\/h3>\n<p>You want to create a dashboard which will automatically refresh itself on a regular basis\n<\/p>\n<h3>The Solution<br \/>\n<\/h3>\n<p>This is easily accomplishable using a SharePoint Web Part and little bit of scripting, JavaScript in this case, to be precise.\n<\/p>\n<h3>How to Accomplish This Task<br \/>\n<\/h3>\n<div>\n<table style=\"border-collapse:collapse\" border=\"0\">\n<col style=\"width:624px\" \/>\n<tbody valign=\"top\">\n<tr>\n<td>\n<p>Start by going to the page you want to edit, and begin editing the page (you will obviously have to have rights to do this).\n<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><img decoding=\"async\" src=\"https:\/\/mmman.itgroove.net\/wp-content\/uploads\/mmman\/2011\/05\/051711_0506_AddinganAut1.png\" alt=\"\" \/>\n\t\t\t\t\t\t<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Add a Web Part to your page (you should already be in a mode like below).\n<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><img decoding=\"async\" src=\"https:\/\/mmman.itgroove.net\/wp-content\/uploads\/mmman\/2011\/05\/051711_0506_AddinganAut2.png\" alt=\"\" \/>\n\t\t\t\t\t\t<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Choose the &#8220;Media and Content&#8221; Category, &#8220;Content Editor&#8221; Web Part, and add it to any part of the page (such as the &#8220;Header&#8221;).\n<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><img decoding=\"async\" src=\"https:\/\/mmman.itgroove.net\/wp-content\/uploads\/mmman\/2011\/05\/051711_0506_AddinganAut3.png\" alt=\"\" \/>\n\t\t\t\t\t\t<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Select the web part and choose &#8220;Edit Web Part&#8221; from the drop down.  A menu will appear on the top right hand side of the page, you may need to scroll over\/up to find it.\n<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><img decoding=\"async\" src=\"https:\/\/mmman.itgroove.net\/wp-content\/uploads\/mmman\/2011\/05\/051711_0506_AddinganAut4.png\" alt=\"\" \/>\n\t\t\t\t\t\t<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Set the Title to &#8220;Refresh the Web Page&#8221;.\n<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><img decoding=\"async\" src=\"https:\/\/mmman.itgroove.net\/wp-content\/uploads\/mmman\/2011\/05\/051711_0506_AddinganAut5.png\" alt=\"\" \/>\n\t\t\t\t\t\t<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Set the Chrome Type to &#8220;None&#8221;.\n<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><img decoding=\"async\" src=\"https:\/\/mmman.itgroove.net\/wp-content\/uploads\/mmman\/2011\/05\/051711_0506_AddinganAut6.png\" alt=\"\" \/>\n\t\t\t\t\t\t<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Click OK to accept those changes.  Then you need to add the script to the web page.  To do this, you start by clicking in the section &#8220;Click here to add new content&#8221;.\n<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><img decoding=\"async\" src=\"https:\/\/mmman.itgroove.net\/wp-content\/uploads\/mmman\/2011\/05\/051711_0506_AddinganAut7.png\" alt=\"\" \/>\n\t\t\t\t\t\t<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>A cursor will appear in the content area, however, don&#8217;t type anything in the content area, instead simply go to the ribbon and under Editing Tools -&gt; Format Text, select the HTML drop down, and choose &#8220;Edit HTML Source&#8221;.\n<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><img decoding=\"async\" src=\"https:\/\/mmman.itgroove.net\/wp-content\/uploads\/mmman\/2011\/05\/051711_0506_AddinganAut8.png\" alt=\"\" \/><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>In the HTML Source box, enter the following JavaScript code.\n<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>[javascript]<\/p>\n<p>function refreshPage()<br \/>\n{<br \/>\n   window.location = window.location;<br \/>\n}<br \/>\nsetTimeout(refreshPage, 300000);<\/p>\n<p>[\/javascript]<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Basically, this script is calling a function after 5 minutes (1000 milliseconds * 60 seconds * 5 minutes = 300000 \u2013 this can be any value you choose, just do the math right), which will refresh the page (without showing the annoying, &#8220;Are you sure you want to resubmit this page&#8221; message that appears in IE when using &#8220;window.location.reload&#8221;).\n<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Finally, stop editing the page and you will be all done.\n<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><img decoding=\"async\" src=\"https:\/\/mmman.itgroove.net\/wp-content\/uploads\/mmman\/2011\/05\/051711_0506_AddinganAut9.png\" alt=\"\" \/>\n\t\t\t\t\t\t<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Your page should now have a hidden Web Part which will refresh the page every 5 minutes (or whatever number you should choose).<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>\n\u00a0<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The Challenge You want to create a dashboard which will automatically refresh itself on a regular basis The Solution This is easily accomplishable using a SharePoint Web Part and little bit of scripting, JavaScript in this case, to be precise. How to Accomplish This Task Start by going to the page you want to edit, &hellip; <a href=\"https:\/\/regroove.ca\/archive\/2011\/05\/16\/adding-an-auto-refresh-content-editor-web-part\/\"><\/a><\/p>\n","protected":false},"author":13,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"inline_featured_image":false,"footnotes":""},"categories":[4,7],"tags":[],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v23.0 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Adding an Auto-Refresh Content Editor Web Part - Archive<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/regroove.ca\/archive\/2011\/05\/16\/adding-an-auto-refresh-content-editor-web-part\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Adding an Auto-Refresh Content Editor Web Part - Archive\" \/>\n<meta property=\"og:description\" content=\"The Challenge You want to create a dashboard which will automatically refresh itself on a regular basis The Solution This is easily accomplishable using a SharePoint Web Part and little bit of scripting, JavaScript in this case, to be precise. How to Accomplish This Task Start by going to the page you want to edit, &hellip;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/regroove.ca\/archive\/2011\/05\/16\/adding-an-auto-refresh-content-editor-web-part\/\" \/>\n<meta property=\"og:site_name\" content=\"Archive\" \/>\n<meta property=\"article:published_time\" content=\"2011-05-17T05:06:20+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-02-24T21:47:09+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/mmman.itgroove.net\/wp-content\/uploads\/mmman\/2011\/05\/051711_0506_AddinganAut1.png\" \/>\n<meta name=\"author\" content=\"Colin Phillips (Alumni)\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Colin Phillips (Alumni)\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/regroove.ca\/archive\/2011\/05\/16\/adding-an-auto-refresh-content-editor-web-part\/\",\"url\":\"https:\/\/regroove.ca\/archive\/2011\/05\/16\/adding-an-auto-refresh-content-editor-web-part\/\",\"name\":\"Adding an Auto-Refresh Content Editor Web Part - Archive\",\"isPartOf\":{\"@id\":\"https:\/\/regroove.ca\/archive\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/regroove.ca\/archive\/2011\/05\/16\/adding-an-auto-refresh-content-editor-web-part\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/regroove.ca\/archive\/2011\/05\/16\/adding-an-auto-refresh-content-editor-web-part\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/mmman.itgroove.net\/wp-content\/uploads\/mmman\/2011\/05\/051711_0506_AddinganAut1.png\",\"datePublished\":\"2011-05-17T05:06:20+00:00\",\"dateModified\":\"2023-02-24T21:47:09+00:00\",\"author\":{\"@id\":\"https:\/\/regroove.ca\/archive\/#\/schema\/person\/adeb0df1cc7a862160be620ca7eace1b\"},\"breadcrumb\":{\"@id\":\"https:\/\/regroove.ca\/archive\/2011\/05\/16\/adding-an-auto-refresh-content-editor-web-part\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/regroove.ca\/archive\/2011\/05\/16\/adding-an-auto-refresh-content-editor-web-part\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/regroove.ca\/archive\/2011\/05\/16\/adding-an-auto-refresh-content-editor-web-part\/#primaryimage\",\"url\":\"https:\/\/mmman.itgroove.net\/wp-content\/uploads\/mmman\/2011\/05\/051711_0506_AddinganAut1.png\",\"contentUrl\":\"https:\/\/mmman.itgroove.net\/wp-content\/uploads\/mmman\/2011\/05\/051711_0506_AddinganAut1.png\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/regroove.ca\/archive\/2011\/05\/16\/adding-an-auto-refresh-content-editor-web-part\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Blog Archive\",\"item\":\"https:\/\/regroove.ca\/archive\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Adding an Auto-Refresh Content Editor Web Part\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/regroove.ca\/archive\/#website\",\"url\":\"https:\/\/regroove.ca\/archive\/\",\"name\":\"Archive\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/regroove.ca\/archive\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/regroove.ca\/archive\/#\/schema\/person\/adeb0df1cc7a862160be620ca7eace1b\",\"name\":\"Colin Phillips (Alumni)\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/regroove.ca\/archive\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/14eeab0d377e9630e0983d9c08911979?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/14eeab0d377e9630e0983d9c08911979?s=96&d=mm&r=g\",\"caption\":\"Colin Phillips (Alumni)\"},\"url\":\"https:\/\/regroove.ca\/archive\/author\/cphillips\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Adding an Auto-Refresh Content Editor Web Part - Archive","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/regroove.ca\/archive\/2011\/05\/16\/adding-an-auto-refresh-content-editor-web-part\/","og_locale":"en_US","og_type":"article","og_title":"Adding an Auto-Refresh Content Editor Web Part - Archive","og_description":"The Challenge You want to create a dashboard which will automatically refresh itself on a regular basis The Solution This is easily accomplishable using a SharePoint Web Part and little bit of scripting, JavaScript in this case, to be precise. How to Accomplish This Task Start by going to the page you want to edit, &hellip;","og_url":"https:\/\/regroove.ca\/archive\/2011\/05\/16\/adding-an-auto-refresh-content-editor-web-part\/","og_site_name":"Archive","article_published_time":"2011-05-17T05:06:20+00:00","article_modified_time":"2023-02-24T21:47:09+00:00","og_image":[{"url":"https:\/\/mmman.itgroove.net\/wp-content\/uploads\/mmman\/2011\/05\/051711_0506_AddinganAut1.png"}],"author":"Colin Phillips (Alumni)","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Colin Phillips (Alumni)","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/regroove.ca\/archive\/2011\/05\/16\/adding-an-auto-refresh-content-editor-web-part\/","url":"https:\/\/regroove.ca\/archive\/2011\/05\/16\/adding-an-auto-refresh-content-editor-web-part\/","name":"Adding an Auto-Refresh Content Editor Web Part - Archive","isPartOf":{"@id":"https:\/\/regroove.ca\/archive\/#website"},"primaryImageOfPage":{"@id":"https:\/\/regroove.ca\/archive\/2011\/05\/16\/adding-an-auto-refresh-content-editor-web-part\/#primaryimage"},"image":{"@id":"https:\/\/regroove.ca\/archive\/2011\/05\/16\/adding-an-auto-refresh-content-editor-web-part\/#primaryimage"},"thumbnailUrl":"https:\/\/mmman.itgroove.net\/wp-content\/uploads\/mmman\/2011\/05\/051711_0506_AddinganAut1.png","datePublished":"2011-05-17T05:06:20+00:00","dateModified":"2023-02-24T21:47:09+00:00","author":{"@id":"https:\/\/regroove.ca\/archive\/#\/schema\/person\/adeb0df1cc7a862160be620ca7eace1b"},"breadcrumb":{"@id":"https:\/\/regroove.ca\/archive\/2011\/05\/16\/adding-an-auto-refresh-content-editor-web-part\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/regroove.ca\/archive\/2011\/05\/16\/adding-an-auto-refresh-content-editor-web-part\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/regroove.ca\/archive\/2011\/05\/16\/adding-an-auto-refresh-content-editor-web-part\/#primaryimage","url":"https:\/\/mmman.itgroove.net\/wp-content\/uploads\/mmman\/2011\/05\/051711_0506_AddinganAut1.png","contentUrl":"https:\/\/mmman.itgroove.net\/wp-content\/uploads\/mmman\/2011\/05\/051711_0506_AddinganAut1.png"},{"@type":"BreadcrumbList","@id":"https:\/\/regroove.ca\/archive\/2011\/05\/16\/adding-an-auto-refresh-content-editor-web-part\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Blog Archive","item":"https:\/\/regroove.ca\/archive\/"},{"@type":"ListItem","position":2,"name":"Adding an Auto-Refresh Content Editor Web Part"}]},{"@type":"WebSite","@id":"https:\/\/regroove.ca\/archive\/#website","url":"https:\/\/regroove.ca\/archive\/","name":"Archive","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/regroove.ca\/archive\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/regroove.ca\/archive\/#\/schema\/person\/adeb0df1cc7a862160be620ca7eace1b","name":"Colin Phillips (Alumni)","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/regroove.ca\/archive\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/14eeab0d377e9630e0983d9c08911979?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/14eeab0d377e9630e0983d9c08911979?s=96&d=mm&r=g","caption":"Colin Phillips (Alumni)"},"url":"https:\/\/regroove.ca\/archive\/author\/cphillips\/"}]}},"_links":{"self":[{"href":"https:\/\/regroove.ca\/archive\/wp-json\/wp\/v2\/posts\/47"}],"collection":[{"href":"https:\/\/regroove.ca\/archive\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/regroove.ca\/archive\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/regroove.ca\/archive\/wp-json\/wp\/v2\/users\/13"}],"replies":[{"embeddable":true,"href":"https:\/\/regroove.ca\/archive\/wp-json\/wp\/v2\/comments?post=47"}],"version-history":[{"count":1,"href":"https:\/\/regroove.ca\/archive\/wp-json\/wp\/v2\/posts\/47\/revisions"}],"predecessor-version":[{"id":2028,"href":"https:\/\/regroove.ca\/archive\/wp-json\/wp\/v2\/posts\/47\/revisions\/2028"}],"wp:attachment":[{"href":"https:\/\/regroove.ca\/archive\/wp-json\/wp\/v2\/media?parent=47"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/regroove.ca\/archive\/wp-json\/wp\/v2\/categories?post=47"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/regroove.ca\/archive\/wp-json\/wp\/v2\/tags?post=47"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}