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

Content URL doesn't change in RadPane

4 Answers 187 Views
Splitter
This is a migrated thread and some comments may be shown as answers.
Matthew
Top achievements
Rank 1
Matthew asked on 25 Sep 2008, 04:02 PM
I am using the Rad Pane to display externally loaded pages.  I also have a button outside of this Rad Pane that, when clicked, will display the URL of the page that is currently being viewed in the Rad Pane.  However, this does not work.  Only the first url loaded into the Rad Pane is every returned by the "get_contentUrl()" javascript method of the RadPane.  If the user clicks on a link in the external page and a new page is loaded into the RadPane, the "get_contentUrl()" does not return the new url.  How can I get the current URL of whatever page is loaded in the RadPane?

Thanks,
Matt

4 Answers, 1 is accepted

Sort by
0
Svetlina Anati
Telerik team
answered on 29 Sep 2008, 03:53 PM
Hi Matt,

I was not sure whether you set the new ContentUrl on the client or on the server and that is why I tested both scenarios but I was not able to reproduce the problem - when I alert the returned result of the get_contentUrl() method, it always returns the correct url.

Would you please examine my test project and in case the problem persists, modify it in order to reproduce teh issue and send it back to me along with your explanation? Once I am able to examine it locally, i will do my best to help.

Best wishes,
Svetlina
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Matthew
Top achievements
Rank 1
answered on 29 Sep 2008, 10:24 PM
Hello, sorry for the confusion about server-side vs. client-side and thank you for testing both.  I mean client-side.  Using your example, I can demonstrate the problem:
  1. Click the "Load Telerik client-side" hyperlink.
  2. Click the "Get current contenturl" button.  Notice the alert says "Current url: http://www.telerik.com".
  3. Now click on the "Services" button of the main menu on the Telerik page that is loaded in the RadPane.
  4. Click the "Get current contenturl" button again.  Notice that the alert still says "Current url: http://www.telerik.com", but the actual url that is loaded in the RadPage is: http://www.telerik.com/services/enterprise-services.aspx.  Therefore, the get_currentUrl() method returned the original URL only, not the current URL.
Please let me know if there is still confusion.

Thanks,
Matt
0
Svetlina Anati
Telerik team
answered on 02 Oct 2008, 12:34 PM
Hello Matt,

When you set the RadPane's ContentUrl you actually create an IFRAME element which loads the external page. This being said, it works exactly as a standard IFRAME element. We are not aware of a way to achieve the behavior you describe by using an IFRAME but in case you succeed to make your scenario work as you want with an IFRAME you can use the same approach with the RadPane. In order to reference the RadPane's IFRAME you should use its client getExtContentElement() method. After you have referenced the IFRAME you can manipulate it in the desired manner.

Kind regards,
Svetlina
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Matthew
Top achievements
Rank 1
answered on 02 Oct 2008, 01:58 PM
Okay, for anyone else out there with this same problem, here is my work-around:

function GetPaneUrl()
{
            var pane = $find("<%= BottomPane.ClientID %>");
            if (pane)
            {
                var obj = pane.getExtContentElement();
                if (obj)
                    return obj.contentWindow.location.href;
            }
           
            return null;
}
Tags
Splitter
Asked by
Matthew
Top achievements
Rank 1
Answers by
Svetlina Anati
Telerik team
Matthew
Top achievements
Rank 1
Share this question
or