Thursday 12 January 2012

How to add a Google Map to a SharePoint Server 2010 page

This is an incredibly useful tool, especially for those of you in the real estate industry. Here’s the basic procedure:
  • Define the map coordinates at the online map provider’s site
  • Copy the code for an embeddable version of the map
  • Paste the code into the HTML view of a Content Editor Web Part
How to add a Google Map to a SharePoint Server 2010 page
First, we need to grab the map.
  1. To start the process, open Google Maps.
  2. In the Text Box, enter the street address you plan on displaying.
  3. Click on the Link button above the map on the right.
  4. Click on the Customize and preview embedded map link located on the bottom.
  5. A second Google Maps window will now open. This window will provide you with some options for customizing the map view.
  6. Select the appropriate or custom map size you wish to display on your Web page.
  7. Copy the HTML map link code contained in Section 3 at the bottom of the page.
Alright, we’ve got it. Now, let’s open up SharePoint.
  1. Open SharePoint.
  2. Select the page in your site where you will be placing the map.
  3. From the Site Actions drop down menu, select Edit Page.
  4. With the SharePoint page open for editing, place the cursor where you want to add a Content Editor Web Part.
  5. In the Editing Tools group on the ribbon, click the Insert tab.
  6. Click the Web  Part.
  7. Click the Media and Content category, and then click Content Editor.
  8. Click Add.
  9. In the Content Editor Web Part, click Click here to add new content.
  10. In the Format Text tab of the ribbon, click HTML, and then click Edit HTML Source.
  11. In the HTML Source window, paste the cofe for the embeddable map, and then click OK.
  12. On the Page tab on the ribbon, click Save & Close.
That’s it! Now your business can be found both on and off the Web!

Monday 9 January 2012

SharePoint JavaScript – Page Load Add function: Page Redirect

<script language="javascript">  
    _spBodyOnLoadFunctionNames.push("Redirect");  
   
    function Redirect()
   {
    window.location="your page name";
    }  
</script>