RadWindow positioning

6 posts, 0 answers
  1. Andy Green
    Andy Green avatar
    120 posts
    Member since:
    Jul 2009

    Posted 06 Apr 2010 Link to this post

    Hi

    I have a rather long page with images, when you click on an image it opens a radwindow with the full size image inside.

    It all works except that when I click on a thumbnail lower down the page when the Radwindow opens it returns the page to the top, but the window is near to where you click, and you have to scroll down to see the Radwindow.

    How can I stop this.

    Andy
  2. Georgi Tunev
    Admin
    Georgi Tunev avatar
    7207 posts

    Posted 06 Apr 2010 Link to this post

    Hello Andy,

    We need more information to be able to help. Could you please post here how exactly you open the RadWindows?


    Sincerely yours,
    Georgi Tunev
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Andy Green
    Andy Green avatar
    120 posts
    Member since:
    Jul 2009

    Posted 06 Apr 2010 Link to this post

    I have this on the image -

    onclick

     

    ="Viewer('1')

     

     

     

     

     

    And this 
     
            <script type="text/javascript">  
     
                function Viewer(id) {  
                    window.radopen("../Viewer/Default.aspx?ID=" + id + "&Title=Jart", "ImageViewer");  
                    return false;  
                }  
            
            </script> 

      Andy

     

     

     

     

     

     

     

     

     

     

     

     

     

  5. Georgi Tunev
    Admin
    Georgi Tunev avatar
    7207 posts

    Posted 08 Apr 2010 Link to this post

    Hello Andy,

    What is the element that you click to open the RadWindow (e.g. to what element you assign the onclick property)? If it is a postback control or a hyperlink, you need to cancel the default action. e.g.
    <head runat="server">
        <title></title>
     
        <script type="text/javascript">
     
            function Viewer(id)
            {
                window.radopen("http://www.google.com", "ImageViewer");
                return false;
            
             
        </script>
     
    </head>
    <body>
        <form id="form1" runat="server">
        <asp:ScriptManager ID="ScriptManager1" runat="server">
        </asp:ScriptManager>
        <telerik:RadWindowManager ID="RadWindowManager1" runat="server">
        </telerik:RadWindowManager>
        <div style="height: 1500px">
        </div>
        <a href="#" onclick="return Viewer('1')">test</a>
        </form>
    </body>

    I hope this helps. If you still experience problems, please open a support ticket and send me a sample page so I can get a better view over your case.


    Greetings,
    Georgi Tunev
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  6. Andy Green
    Andy Green avatar
    120 posts
    Member since:
    Jul 2009

    Posted 08 Apr 2010 Link to this post

    Hi

    I'm clicking on an image:

    <

     

    a href="#"><img src="images/1_tn.jpg" class="thumbs" onclick="Viewer('1')"/></a>

     

     

    And as already posted my client side script doed return false. There is no postback unless the RadWindow id doing one. The window opens but the page jumps to the top.

    ??? Href="#" I wonder if the page is looking for an anchor called # so jump to the top, and fails to retian its scroll position

    ANdy

  7. Andy Green
    Andy Green avatar
    120 posts
    Member since:
    Jul 2009

    Posted 08 Apr 2010 Link to this post

    Fixed it.

    It was the href=#". Taking out the anchor and it was fine. Had the change a coulple of styles and they the specified for 'a' but now we're good.

    Thank you for your time.

    Andy
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017