There is a problem with the SmartScroller JS code in Internet Explorer when used in standards compliance mode.
Basically you end up with a 'xxxxx.scrollLeft' is undefined error because of the way the hidden input box is referenced.
Modifying the .OnInit() function in SmartScroller.cs fixes the problem:
Code:
protected override void OnInit(EventArgs e)
{
string tFormID = "Form";
if (Page.Parent != null)
m_theForm = GetServerForm(Page.Parent.Controls);
else
m_theForm = GetServerForm(Page.Controls);
if (m_theForm != null && m_theForm.ClientID != null)
{
tFormID = m_theForm.ClientID;
}
hidScrollLeft.ID = "scrollLeft";
hidScrollTop.ID = "scrollTop";
this.Controls.Add(hidScrollLeft);
this.Controls.Add(hidScrollTop);
string scriptString = @"
<!-- yaf.controls.SmartScroller ASP.NET Generated Code -->
<script language = ""javascript"">
<!--
function yaf_SmartScroller_GetCoords()
{
var scrollX, scrollY;
if (document.all)
{
if (!document.documentElement.scrollLeft)
scrollX = document.body.scrollLeft;
else
scrollX = document.documentElement.scrollLeft;
if (!document.documentElement.scrollTop)
scrollY = document.body.scrollTop;
else
scrollY = document.documentElement.scrollTop;
}
else
{
scrollX = window.pageXOffset;
scrollY = window.pageYOffset;
}
document.getElementById('" + hidScrollLeft.ClientID + @"').value = scrollX;
document.getElementById('" + hidScrollTop.ClientID + @"').value = scrollY;
}
function yaf_SmartScroller_Scroll()
{
var x = document.getElementById('" + hidScrollLeft.ClientID + @"').value;
var y = document.getElementById('" + hidScrollTop.ClientID + @"').value;
if (x || y) window.scrollTo(x, y);
if (oldOnLoad != null) oldOnLoad();
}
var oldOnLoad = window.onload;
window.onload = yaf_SmartScroller_Scroll;
window.onscroll = yaf_SmartScroller_GetCoords;
window.onclick = yaf_SmartScroller_GetCoords;
window.onkeypress = yaf_SmartScroller_GetCoords;
// -->
</script>
<!-- End yaf.controls.SmartScroller ASP.NET Generated Code -->";
Page.ClientScript.RegisterStartupScript(Page.GetType(),"SmartScroller", scriptString);
}
Please note that I have removed the yaf_getForm() JS function because there is no need for it.