Thursday, March 11, 2010

How to change the Maximum File Upload Size

When a custom master page is applied, editing a list in Datasheet View causes IE to just hang. I found this script hich solved my problem:
<script type="text/javascript">

function GCComputeSizing(GCObject)
{
if (TestGCObject(GCObject))
{
var fBIDI=(document.documentElement.currentStyle.direction=="rtl");
var lGCWindowWidth=document.documentElement.scrollWidth;
var lGCWindowHeight=(document.documentElement.scrollHeight>document.documentElement.clientHeight) ? document.documentElement.clientHeight : document.documentElement.scrollHeight;

var lGCObjectOffsetLeft=0;
var lGCObjectOffsetTop=0;
if (fBIDI)
{
lGCObjectOffsetLeft=-180;
lGCObjectOffsetTop=120;
}
else
{
lGCObjectOffsetLeft=32;
lGCObjectOffsetTop=-2;
}
var lGCObjectWalker=GCObject.parentElement;
while (lGCObjectWalker !=document.body)
{
lGCObjectOffsetLeft+=lGCObjectWalker.offsetLeft;
lGCObjectOffsetTop+=lGCObjectWalker.offsetTop;
lGCObjectWalker=lGCObjectWalker.offsetParent;
if (fBIDI)
if (lGCObjectWalker.offsetLeft > 0)
break;
}
lGCObjectOffsetLeft+=GCObject.parentElement.offsetLeft;
lGCObjectOffsetTop+=GCObject.parentElement.offsetTop;
glGCObjectHeight=lGCWindowHeight - lGCObjectOffsetTop;
if (glGCObjectHeight > lGCWindowHeight)
glGCObjectHeight=lGCWindowHeight
if (glGCObjectHeight < cGCMinimumHeight)f
glGCObjectHeight=cGCMinimumHeight;
if (fBIDI)
{
glGCObjectWidth=lGCWindowWidth+lGCObjectOffsetLeft;
}
else
glGCObjectWidth=lGCWindowWidth - lGCObjectOffsetLeft;
if (glGCObjectWidth > lGCWindowWidth)
glGCObjectWidth=lGCWindowWidth;
if (glGCObjectWidth < cGCMinimumWidth)
glGCObjectWidth=cGCMinimumWidth;
}
}

</script>
place it after core.js in your master page.

No comments: