Skip edititem.aspx while uploading documents to document library in sharepoint
or
How to bypass Edit Properties Page while uploading documents in a document library
Simply add this to your edititem.aspx below the placeholdermain
or
How to bypass Edit Properties Page while uploading documents in a document library
<script type="text/javascript">
_spBodyOnLoadFunctionNames.push("Redirect");
function Redirect()
{
var mode = getURLParam('Mode');
/* var sourceURL = getURLParam('Source');
var properSourceURL = replaceCharacters(sourceURL); */
if (mode == "Upload")
window.frameElement.commonModalDialogClose(1, 'saved');
/* window.location = properSourceURL;*/
}
function getURLParam(name)
{
name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");
var regexS = "[\\?&]"+name+"=([^&#]*)";
var regex = new RegExp( regexS );
var results = regex.exec( window.location.href );
if( results == null )
return "";
else
return results[1];
}
function replaceCharacters(str)
{
str = str.replace(/%20/g, " ");
str = str.replace(/%2F/g, "/");
str = str.replace(/%3A/g, ":");
str = str.replace(/%2E/g, ".");
return str;
}
</script>
This comment has been removed by the author.
ReplyDeletehow about avoid edit properties dialog window and show the edit page instead?
ReplyDeletehow about avoid edit properties dialog window and show the edit page instead?
ReplyDeletehow about avoid edit properties dialog window and show the edit page instead?
ReplyDelete