"window.open" is not working using radtooltipmanager control

2 posts, 0 answers
  1. Bader
    Bader avatar
    215 posts
    Member since:
    Aug 2008

    Posted 26 Apr 2011 Link to this post


    I have a problem in opening a window form after opening the radtooltipmanager..
    Please view the webpage http://israel-jewelry-center.com/Pages/Categories/Bracelets.aspx. By coming over any item, a radtooltipmanager opens, and by clicking the big image, a radwindow opens.
    The requirements is to change the radwindow control with a window (using the javascript command window.open). 
    I added the following code to the Bracelets.aspx page:
    function CloseActiveToolTipAndOpenUrl(path) {
                setTimeout(function () {
                    var tooltip = Telerik.Web.UI.RadToolTip.getCurrent();
                    if (tooltip) {
                        tooltip. hide();
                        window.open(path, "mywindow", "status=1");
                }, 1000);

    But unfortunatily, just the command tooltip.hide() is executed, but the window.open(path, "mywindow", "status=1") didn't.
    I dont understand why is that.

    Please download the sample application from http://www.israel-jewelry-center.com/ToolTipSampleApplication.rar 

    Please, I need your help,
    It is appreciated to send me the modified code with an explaination,

  2. Marin Bratanov
    Marin Bratanov avatar
    3558 posts

    Posted 29 Apr 2011 Link to this post

    Hello Bader,

    You sample is not runnable and I had to take out all database-related calls.

    That aside here are a few suggestions:

    • The ToolTip is a client object, you should work with it on the client-side, because after the postback of the button there might be no active tooltip and thus the window.open() function inside the if statement will not be called
    • Attaching the CloseActiveToolTipAndOpenUrl() function to the client click event of the image button successfully opens a new browser window as you can see in the demo from my test: .
    • I would recommend setting a RelativeTo property of the RadToolTipManager
    • There are two RadWindowManagers with the same id - one in the user control and one in the main page. This might cause some issues so I would recommend changing one of them, or removing the irrelevant one since you are not going to be opening a RadWIndow, but a browser window.
    • The easiest way to pass the required URL from the code-behind (as this is your scenario) is to use the AjaxPanel's response scripts and change the value of a global variable

    For your convenience I modified your page to do that. You can find it attached.

    the Telerik team

    Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

  3. DevCraft R3 2016 release webinar banner
Back to Top