SharePoint Upload.aspx hack

December 17, 2004 02:00 by keithkaragan

My client wanted the Upload.aspx page's 'create a listing for this document' checkbox to be unchecked by default. A seemingly simple task, that was simple after I noticed that I didn't notice the <SPSWC:SubmitLinkOnSTSUploadDocPage> control on the page. The control (BTW - couldn't find this control in the SDK ... cough, cough) doesn't take any args or have properties ... and is set by default to having the checkbox CHECKED - nice! The control injects a javascript that inserts a final row in the main table of document properties with the checkbox and the accompanying text. The page has all kinds of things going on, and this is written towards the end of the page loading, so hooking on the page load wasn't working for me. Anyway, a simple function looking for the window load event and kicking off a function to uncheck the box worked - I put this right before the body tag, and all worked as expected. Your results may vary:

function UnCheckListing()       
// unchecks the submitlst checkbox used for           
// specifying is a listing should be created           
var chk = document.getElementById('submitlst');           
chk.checked = false;          
// -->    
<script FOR=window EVENT=onload LANGUAGE="JScript">          
// uncheck the create listing checkbox created by the          
// 'SPSWC:SubmitLinkOnSTSUploadDocPage' SPS control.          


Digg It!DZone It!StumbleUponTechnoratiRedditDel.icio.usNewsVineFurlBlinkList

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Related posts

Comments are closed