* Free Webinar *
Build SharePoint 2013 Application Solutions - All You Need is a Browser!
Thursday 25 April at 11am PDT. Register now! Space is limited.

* Free Whitepapers *



* Free Trials *





* Get a Free SharePoint Art of the Possible Presentation for your Business *
Contact Joel Oleson
I'm now consulting with Salient 6
Friendly Sponsored Ads

BlueStripe
Metalogix
SharePoint Joel's SharePoint Land > Posts > Redirect SharePoint Natively with a Content Editor Webpart
Redirect SharePoint Natively with a Content Editor Webpart
It can be a pain as you reorganize your site and try to get users to update their links.
 
Here's a handy way to do a redirect without editing anything server side.  Not that that's what you should do in SharePoint any way.  
 
 
Add this snip of code below to to the content editor web part in HTML view on the page you want to redirect from.  You will likely want to change the header bar to none to hide the web part as well.
 
Code Snip: Edit the URL and time as desired.
 
------------------
 
<script language="JavaScript">
  function redirectAfterPause() {
    setTimeout("location.href='http://www.bing.com'", 15000);
  }
  _spBodyOnLoadFunctionNames.push("redirectAfterPause");
 </script>
 
-----------------
 
Note 5000=1 second.  Replace bing with your target URL.  Thanks Darin, not sure where you got this, but if you found this somewhere, thanks to that developer as well, and hope you don't mind me sharing it!
 
Note that _spBodyOnLoadFunctionNames is a native SharePoint Function.
comments powered by Disqus

 20 Recent Posts

Product Analysis: OnePlaceMail 6.4 by ScinapticUse SHIFT+ENTER to open the menu (new window).New
THE Microsoft SharePoint Conference 2014 in Las Vegas March 3-6 #SPC14Use SHIFT+ENTER to open the menu (new window).
Yammer Integration with SharePoint Online begins with a link in Office 365Use SHIFT+ENTER to open the menu (new window).
SPTechcon Boston 2013 – What are you waiting for?Use SHIFT+ENTER to open the menu (new window).
Announcement: 11 Keys to Optimizing SharePoint for Field Personnel and Traveling Executives Use SHIFT+ENTER to open the menu (new window).
Watch TechEd 2013 SharePoint Related Sessions On Demand #MSTechedUse SHIFT+ENTER to open the menu (new window).
Southern California Tour: June 25-27 #SANSPUG San Diego #OCSPUG Orange County #LASPUG Los AngelesUse SHIFT+ENTER to open the menu (new window).
The Quest Has Begun – To See Every Country in the World by Age 50Use SHIFT+ENTER to open the menu (new window).
Announcement: EMC Releases new Documentum Connector for Microsoft SharePointUse SHIFT+ENTER to open the menu (new window).
Seriously Time to Revisit Your Enterprise Browser StandardsUse SHIFT+ENTER to open the menu (new window).
SharePoint Governance Infographic and Strategic PlanningUse SHIFT+ENTER to open the menu (new window).
Still Sad Story: Office 64 & IE 64 with SharePoint 2013Use SHIFT+ENTER to open the menu (new window).
ANNOUNCEMENT: CacheFront Professional Open Beta Sign-Ups Now OpenUse SHIFT+ENTER to open the menu (new window).
SharePoint 2013 Analytics A Big Step BackwardUse SHIFT+ENTER to open the menu (new window).
Product Analysis: Metalogix Replicator for SharePointUse SHIFT+ENTER to open the menu (new window).
ANNOUNCEMENT: CipherPoint Releases Content Scanner and Version 1.9 Transparent Encryption Software, Adds Support for SharePoint 2013, and File ServersUse SHIFT+ENTER to open the menu (new window).
Blog Talk Radio: Collaboration Tech Talk - SharePoint 2013 InsightsUse SHIFT+ENTER to open the menu (new window).
Utah SharePoint Business Value Workshop 2013 and Art of the PossibleUse SHIFT+ENTER to open the menu (new window).
SharePoint 2013 Browser Comparison Report CardUse SHIFT+ENTER to open the menu (new window).
ANNOUNCEMENT: Metalogix Launches Content Matrix Migration Express to Simplify and Speed Up SharePoint Migrations On-Premises or in the CloudUse SHIFT+ENTER to open the menu (new window).