Problem with client-side opening, with images..?

2 posts, 0 answers
  1. Chris Gårdenberg
    Chris Gårdenberg avatar
    13 posts
    Member since:
    Nov 2008

    Posted 17 Sep 2010 Link to this post

    Here's a nut to crack :)

    I have a app that uses radwindows for popups for filling in data, and in one case, I need to open another popup within the popup, but from the parent.

    When I use a regular text-link, I can go like:

    <a href="javascript://" onclick="var win = GetWindow().BrowserWindow.radopen('randomPopup.aspx'); win.set_modal(true);">Click me</a>
    And it works fine, it sets the old popup out of focus, sets the modal and everything works out fine.

    But when I use this:

    <a href="javascript://" onclick="var win =
    win.set_modal(true);"><img src="clickMe.png" /></a>
    The popup which initiated the new popup, stays active, the background goes modal, and the new popup hides behind the first popup.

    Took me a good 2 hours to understand that it wasn't the surrounding HTML that made it impossible to work, it was just that image. :)

    If you need more information, ask away :)


    .setActive() does not work aswell. :) (In the Image-case)
  2. Georgi Tunev
    Georgi Tunev avatar
    7207 posts

    Posted 21 Sep 2010 Link to this post

    Hello Chris,

    Here is how to avoid that problem. It comes from the way the browser handles the focus on the button

            function test()
                window.setTimeout(function ()
                    var win = GetRadWindow().BrowserWindow.radopen('randomPopup.aspx');
                }, 0);
        <a href="javascript:void(0);" onclick="test(); return false;">
            <img src="clickMe.png" /></a>

    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
Back to Top