[CLOSED] Scroll to bottom in a Panel

  1. #1

    [CLOSED] Scroll to bottom in a Panel



    Hi
    I have a panel that has alot of rows in it, and I want to make a javascript call to make this panel to scoll to the bottom of the panel. Any idea of how to do this?

    Thanks!

    /Mikael
  2. #2

    RE: [CLOSED] Scroll to bottom in a Panel

    Hi,

    What you mean "rows"? Do you have a grid? Can you show a sample?
  3. #3

    RE: [CLOSED] Scroll to bottom in a Panel

    Sorry for beeing unclear. No grid, just a panel with a lot of text in it, there for the scroll bars are shown in the panel. I want to make a JS call which automatically scrolls to the bottom of the panel.

    Something like this
    
    Scroll to bottom
    <Panel runat="serveer" id="Panel1">
        <body>
             Row<br />
             Row<br />
             Row<br />
             Row<br />
             Row<br />
             Row<br />
             Row<br />
             Row<br />
             Row<br />
             Row<br />
             Row<br />
             Row<br />
        </body>
    </Panel
    /Mikael
  4. #4

    RE: [CLOSED] Scroll to bottom in a Panel

    Hi,

    "Panel1.body.scroll('b',1000000);
  5. #5

    RE: [CLOSED] Scroll to bottom in a Panel



    Thanks, that works great for my example, but not in my project. But in my project there is an IFrame there instead. I did not realize there would be any difference.

    Please see this example, this does not work.

    Thank you!
    /Mikael

    <%@ Page Language="C#" %>
    <%@ Register Assembly="Coolite.Ext.Web" Namespace="Coolite.Ext.Web" TagPrefix="ext" %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    
    
    <script runat="server">
    </script>
    
    
    <script type="text/javascript">
    
    
        
    </script>
    
    
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <title></title>
    </head>
    <body>
        <ext:ScriptManager ID="ScriptManager1" runat="server" >
        </ext:ScriptManager>
        
        <form id="form1" runat="server">
        Scroll to bottom
        <ext:Panel runat="server" ID="Panel1" Height="100" AutoScroll="true">
        <AutoLoad Url="http://www.google.se"></AutoLoad>
        </ext:Panel>
    
    
        </form>
    </body>
    </html>
  6. #6

    RE: [CLOSED] Scroll to bottom in a Panel

    Hi,

    If use Google site then it is impossible because your page and Google from variuos domains (it is impossible due security reasons)


    If pages in one domain then try the following
    Panel1.iframe.dom.contentWindow.scrollTo(0, 1000000);
  7. #7

    RE: [CLOSED] Scroll to bottom in a Panel



    Thanks works great! Yes Its a local page. I just used google to simplify the example.
    This code works, you code hade the wrong casing in content[W]indow. It has happen before, maybe you can correct it.

    Panel1.iframe.dom.contentWindow.scrollTo(0, 1000000);


    /Mikael
    </p>

Similar Threads

  1. [CLOSED] automatic data moving from bottom to top in grid panel
    By Vasudhaika in forum 1.x Legacy Premium Help
    Replies: 8
    Last Post: May 28, 2014, 5:26 AM
  2. [CLOSED] How to reduce the padding for buttons at panel bottom?
    By rnachman in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Sep 08, 2011, 4:39 PM
  3. [CLOSED] ListView and scroll to the bottom
    By krzak in forum 1.x Legacy Premium Help
    Replies: 5
    Last Post: Mar 03, 2011, 1:57 PM
  4. Moving header of panel to bottom
    By mschoudry in forum 1.x Help
    Replies: 0
    Last Post: Jan 08, 2011, 7:02 AM
  5. Replies: 1
    Last Post: Sep 10, 2010, 9:57 AM

Posting Permissions