Welcome to Office Zealot Sign in | Join | Help

Disabling SharePoint Portal's "add a listing for this document" checkbox

I've had a few folks ask for a way to disable that annoying second page on a document upload that deals with adding a listing.  If you remember, there's a checkbox at the bottom of the Upload page that asks whether to add a listing for that document.  That checkbox is defaulted to checked.  If you don't remember to uncheck it, you get that second page.

Here's a way to set that checkbox to unchecked:

1. Go to:

 Local_Drive:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\60\TEMPLATE\SPS\1033\SPS\LISTS\DOCLIB

Note, this is to make the change in the SharePoint areas.

2. Open Upload.aspx

3. Go to the bottom of Upload.aspx:                

4. Insert the following JavaScript just above the /BODY tag (make sure to remove the spaces after the '<'... I had to put them there to get the script in this blog!):
< SCRIPT language=javascript event=onload for=window>
document.all.submitlst.checked=false;
< /SCRIPT>

5. Save the changes

Note: This modification is a customization to a standard SharePoint file.  It may get overlaid by future Microsoft Service Packs.  Be sure to add this change to your Disaster Recovery documentation.

Published Wednesday, March 23, 2005 10:59 by Mauro

Comments

Thursday, March 24, 2005 8:37 by Anonymous

# re: Disabling SharePoint's "add a listing for this document" checkbox

Is this a SPS document library thing only?

I've never seen such a thing. (and I didn't when I just checked either).
Thursday, March 24, 2005 9:32 by Anonymous

# re: Disabling SharePoint's "add a listing for this document" checkbox

If you don't even want to give users the chance to add a listing for document uploads, another option is to completely remove that checkbox. Delete the following line from the upload.aspx file:
&lt;SPSWC:SubmitLinkOnSTSUploadDocPage runat=server /&gt;
Thursday, March 24, 2005 1:09 PM by Anonymous

# re: Disabling SharePoint's "add a listing for this document" checkbox

This goes back directly to the "SharePoint" vs. "Portal" name usage argument over on MikeFitz's and the SharePointThoughts blogs.

This tip applies to Portal.... SPS.

Not SharePoint... WSS.

(might be a good idea to correct the title!)
Friday, April 08, 2005 8:59 by Anonymous

# the best school of english

This is the best english school in england: www.etc-inter.net
Tuesday, April 19, 2005 4:23 PM by Anonymous

# re: Disabling SharePoint Portal's "add a listing for this document" checkbox

This is great if you don't have 1,000's of libraries already created. If so, you have to edit each upload.aspx file which is a pain. Also, if you try to comment out the code that handles the check box function an error will appear, you have to remove it completly.
Monday, April 25, 2005 5:30 PM by Anonymous

# HOW to Disable "Shared Document" onside Mysite in SPS 2003?

Hi!

I am trying to disable the "Shared Documents" option inside " Mysite".

Can anyone tell me how i can do this?

Thanks
Friday, September 23, 2005 8:02 by Anonymous

# Flash web design from 7AAA company.

Web design. Flash web design services and web site development. Dynamic photorealistic presentations.
Monday, October 03, 2005 10:55 PM by Anonymous

# re: Disabling SharePoint Portal's "add a listing for this document" checkbox

Note: The Upload.aspx file is also used when creating folders - and the submit listing option is not present for this operation. When you attempt to add a folder - you will get a Javascript debug error - "Error: 'document.all.submitlst' is null or not an object". The code should be:

if (document.all.submitlst)
document.all.submitlst.checked=false;
Monday, October 10, 2005 9:38 PM by Anonymous

# Elements Hostel

Elements Hostel is the most luxurious, affordable, safe and comfortable place to stay in Chennai for Backpackers and any other kind of travelers. The hostel is located in the tourist, commercial and financial area better known as
"Nungambakkam", one of the most dynamic and exciting areas in the city, with a remarkable cosmopolitan atmosphere.
Elements Hostel is your ideal replacement for an expensive hotel.
Wednesday, November 09, 2005 6:10 by Anonymous

# re: Disabling SharePoint Portal's "add a listing for this document" checkbox

Hope this help someone.


in OWS.css paste this:


#submitlst{
behavior:url("/_layouts/1033/STYLES/Custom/removeListings.htc");
}


create the subfolder and the .htc file. Content for .htc is:


<PUBLIC:COMPONENT TAGNAME="removeListings">

<PUBLIC:DEFAULTS VIEWLINKCONTENT />

<SCRIPT>
element.checked = false;
element.disabled = true;

</SCRIPT>

</PUBLIC:COMPONENT>


This will globally disable and uncheck the add to listings box.

It will appear to flash because of the strange method Microsoft use to put the add to listings box on the page.

You could also remove the row by using.

element.parentElement.parentElement.style.display="none";


Hope this helps. Remember .htc is only IE which for sharepoint is not a problem.
Monday, January 23, 2006 8:47 PM by Anonymous

# International Boutique Hostel In Chennai

Elements hostel is Chennai's first hostel which is Luxurious, affordable, safe and comfortableplace to stay in Chennai for Backpackers and any other kind of travelers.
Tuesday, March 14, 2006 2:55 by Anonymous

# Elements Hostel

Elements Hostel is the most luxurious, affordable, safe and comfortable place to stay in Madurai for Backpackers and any other kind of travelers.The hostel is in the city of MADURAI where the world famous Meenakshi Amman Temple is located, and situated at "K K NAGAR", one of the most dynamic and exciting area in the city, with a remarkable cosmopolitan atmosphere. Elements Hostel is your ideal replacement for an expensive hotel. A few meters away from Elements Hostel, you'll find the cities best restaurants, shopping malls, specialty stores, handicraft markets, banks, currency exchange and many other attractions.
Wednesday, March 15, 2006 8:30 by Anonymous

# re: Disabling SharePoint Portal's "add a listing for this document" checkbox

Chris, hats off to you for this solution. Good job, buddy.
Friday, April 28, 2006 3:41 PM by Anonymous

# re: Disabling SharePoint Portal's "add a listing for this document" checkbox

Awesome solution, Chris! Many thanks.
Tuesday, November 07, 2006 9:14 by Anonymous

# re: Disabling SharePoint Portal's "add a listing for this document" checkbox

GREAT!!!
Anonymous comments are disabled