Saturday, September 27, 2008

Link button to Delete Current Sharepoint Webpart

Well on my search for new stuff i found all the Sharepoint Web Part javascripts events, i say to my self, "GREAT", now can explorer that litle secrect Sharepoint Webpart have, so i make this litle script to delete current Webpart.

I found this Javascript method "MSOLayout_AddChange(WebPart,Property,NewValue)" to update propertys, greate now just use....

Delete Web Part:
Add Content Editor Web Part and select "html editor"

< script type="Text/ JavaScript" >
function RemoveWP()
var WPQId;
var WPObject;
var titleid;
var WPQPos;;
if (WPQPos>0)
WPQId='WebPart' + titleid.substring(WPQPos, titleid.length);
< / script >
< href="#" onclick="javascript:RemoveWP()">Delete Webpart< / a >

1 comment:

Pedro said...

Ola grande Andre!
O teu blog continua a bombar!! nao pares!
Tenta colocar post tecnicos mas tambem mas de negocio ou para dummies!!! apenas uma sugestao!!
Grande abraço!