Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

So I know you can use jvascript:emptyItems() in the address bar of the recycle bin to clear it, but this clears the entire site collection.

Is there a way using javascript to empty the recycle bin for only a single site? Current sites context, or specifying the site?

the reason I am asking for javascript particularly is that I need a front end solution to this, something like javascript in SPD is the extent of development capabilities.

Thanks as always

share|improve this question

2 Answers 2

up vote 2 down vote accepted

In the JS Client Object Model there is class by which you can access the recycle bin of the site collection but not a specific web. However, you can iterate through the items in the recycle bin to determine whether to delete or keep them. Have a look at it here:

http://msdn.microsoft.com/en-us/library/ff411858

share|improve this answer
    
thanks.....this helps answer my question. –  Justin Sep 4 '12 at 17:07

did you tried spweb.recyclebin yet

or

SPWeb.recycle

Hope it helped, if it doesn't help then what exactly code you used before ?

share|improve this answer
    
sorry if I was unclear; update question I need a front end solution. the most i can use is javascript/jquery in SPD or text files in CEWP kinda thing. I have to make this available to other end users in a generic kind of way. –  Justin Aug 28 '12 at 15:49
    
thanks though. something knew to learn :) –  Justin Aug 28 '12 at 15:49

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.