S
Steve
I have been beating my head against a wall trying to get my treeview to
return to the same scrolled to location after a postback. I have used
the following javascript to set the scroll for a div section with no
luck. The js runs, returns a valid current scroll value, but the
scrollTop stays at 0.
var scrollel=document.getElementById("divAdmFeedTree");
if(scrollel!=null)
{
var
scrollval=document.getElementById("ctl00_CPHBase_divAdmFeedTreeScroll");
//alert("S");
if(scrollval!=null && scrollval.value!=null)
{
alert(scrollval.value);
scrollel.scrollTop=scrollval.value;
alert(scrollel.scrollTop);
}
}
I have also used the following js code (and several different versions
of it) to set the ScrollintoView, also with no luck.
var name = "ctl00_CPHBase_tvCategories_SelectedNode";
var Node = document.getElementById(name);
if(Node!=null){
/var selectedNode=null;
if(Node.value!=null && Node.value.length>0)
{
selectedNode = document.getElementById(Node.value);
}
if(selectedNode!=null)
selectedNode.scrollIntoView(true);
selectedNode.focus();
}
A fresh set of eyes (or perspective) would be greatly appreciated.
Thanks,
return to the same scrolled to location after a postback. I have used
the following javascript to set the scroll for a div section with no
luck. The js runs, returns a valid current scroll value, but the
scrollTop stays at 0.
var scrollel=document.getElementById("divAdmFeedTree");
if(scrollel!=null)
{
var
scrollval=document.getElementById("ctl00_CPHBase_divAdmFeedTreeScroll");
//alert("S");
if(scrollval!=null && scrollval.value!=null)
{
alert(scrollval.value);
scrollel.scrollTop=scrollval.value;
alert(scrollel.scrollTop);
}
}
I have also used the following js code (and several different versions
of it) to set the ScrollintoView, also with no luck.
var name = "ctl00_CPHBase_tvCategories_SelectedNode";
var Node = document.getElementById(name);
if(Node!=null){
/var selectedNode=null;
if(Node.value!=null && Node.value.length>0)
{
selectedNode = document.getElementById(Node.value);
}
if(selectedNode!=null)
selectedNode.scrollIntoView(true);
selectedNode.focus();
}
A fresh set of eyes (or perspective) would be greatly appreciated.
Thanks,