SharePoint - JavaScript code to hide Webpart Zone using content editor webpart

Asked By ankit on 26-Jun-12 10:35 AM

I need to hide an empty webpart zone which in on right vertical coloumn of other webpart zone. I dont want to use Designer. Just seeking if any java scripts can be provided to content editor webpart to hide this zone.
[)ia6l0 iii replied to ankit on 26-Jun-12 10:11 PM
Add a function: 

function hideunwantedwebpart()
  var tn = document.getElementsByTagName("tablename")
  var ele = tn.uniqueidentifier."none";

As you see, you will have to identify the unique name for the webpart that is rendered, and then decide to call it via this function. 

Push the function to be run on OnLoad

Hope this helps you start.
Jitendra Faye replied to ankit on 27-Jun-12 01:09 AM
Using css alos you can hide this-

use this css-


add this css using following steps-

Hide the Quick Launch in a Content Editor Web Part (CEWP).
1. Edit the page.
2. Add Content Editor Webpart to a Web Part Zone.
3. Select Edit - Modify Shared Web Part
4. Under Appearance, change title to Hide Quick Launch.
5. Under Layout, check the Hidden option.
6. Click the Source Editor button and add the above markup.

hope this will help you.

refer this link also-
Asked By ankit on 27-Jun-12 06:12 AM
naah..its not i need to put some unique ID in this code. Kindly let me know how to get this. I want to add the javascript code to CEWP. which hide that particular webpart zone
Asked By ankit on 27-Jun-12 06:34 AM
Hey, I know how to insert javascript code to CEWP. but the code is not there. the one you provided didn't work. wanted to know if i need to do some modification in the code you provided.

Let me give you a detail description of my issue:

In My SharePoint page. I have an extra empty webpart zone which is on vertically right side of the page. I need to remove this webpart zone so that the extra blank space on my page disappears. I cannot do this by SharePoint Designer as unghosting is nt recommende by admin. Kindly provide javascript code which can be added to CEWP to hide this WEB part Zone. Thanks in advance!!

Please note i have to remove a webpart zone not a webpart.