1

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

2

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

2

did you tried spweb.recyclebin yet

or

SPWeb.recycle

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

  • 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

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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