tags:

views:

28

answers:

2

I have an tree control inside of a frame. It's quite tall, around 2000 pixels. Right now, we use the frame's scroll bars, which is mostly good. Unfortunately, when you select an item near the bottom of the list, the page reloads and the view goes back to the top of the list.

I tried calling the tree control's ScrollNodeIntoView() function, but since we're not using the tree's scroll bars, it just thinks that it's displaying the full 2000 pixels and the control doesn't have its own scroll bar. I'm not much of an HTML guru, so I have two ideas, neither of which I know how to do.

1) Tell the frame to not to let the tree render all 2000 pixels and instead stay inside the viewable area.

2) Tell the tree to not render all 2000 pixels and instead stay within the viewable area.

Setting the CSS height property on the within the frame doesn't do anything.

<frameset rows="*" cols="250,*" frameBorder="yes">
  <frame name="mytree" scrolling="no">
  <frame name="content" scrolling="yes">
</frameset>

Thanks.

A: 

Without seeing the code there's not much constructive one can offer, except to ask what a click on one of the nodes in your tree looks like. Is it a link <a/> that has "#" as its href?

Robusto
It's a javascript tree, specifically, UltraWebTree from Infragistics. I'm not totally sure what mechanism it uses to process node clicks. The nodes are just <span> tags, not <a/> tags, so there's no target. There is a javascript function that the UltraWebTree emits that processes the clicks; I do know that much.
ryancerium
A: 

Frame? You mean an iframe?

Set the iframe's height to the height of the tree, and remove the scroll bar from the iframe. Place the iframe inside a div, set the div to a specific height, and set the overflow of the div to scroll.

Josh
Alas, no. I mean the old skool frameset and frame tags. Keepin' it real, 1997 style.
ryancerium