This is a migrated thread and some comments may be shown as answers.

RadWindow positioning

5 Answers 103 Views
Window
This is a migrated thread and some comments may be shown as answers.
Andy Green
Top achievements
Rank 1
Andy Green asked on 06 Apr 2010, 08:19 AM
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

5 Answers, 1 is accepted

Sort by
0
Georgi Tunev
Telerik team
answered on 06 Apr 2010, 10:41 AM
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.
0
Andy Green
Top achievements
Rank 1
answered on 06 Apr 2010, 11:17 AM
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

 

 

 

 

 

 

 

 

 

 

 

 

 

0
Georgi Tunev
Telerik team
answered on 08 Apr 2010, 01:23 PM
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.
0
Andy Green
Top achievements
Rank 1
answered on 08 Apr 2010, 01:51 PM
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

0
Andy Green
Top achievements
Rank 1
answered on 08 Apr 2010, 03:21 PM
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
Tags
Window
Asked by
Andy Green
Top achievements
Rank 1
Answers by
Georgi Tunev
Telerik team
Andy Green
Top achievements
Rank 1
Share this question
or