Quantcast
Channel: SharePoint 2010 - Development and Programming forum
Viewing all articles
Browse latest Browse all 11571

How to refence a specific web part on a page using Javascript

$
0
0

hello everyone,

I found a very simple snippet that I can add to a CEWP that changes the view in a calendar web part from Day, Week and Month.

This works great until I add more calendars on my page. My snippet only works for the first calendar that was added and not the other calendar web parts.

Can someone help me modify my snippet so that it can point and change the view of a specific web part.

Thanks in advance.

Here is my current snippet:

<div style="float:right"><div style="float:left; padding-right:10px;"><a onclick="javascript:MoveView(&#39;day&#39;);" href="#">Day View</a> </div><div style="float:left; padding-right:10px;"><a onclick="javascript:MoveView(&#39;month&#39;);" href="#">Week View</a> </div><div style="float:left; padding-right:10px;"><a onclick="javascript:MoveView(&#39;month&#39;);" href="#">Month View</a> </div></div>



Viewing all articles
Browse latest Browse all 11571

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>