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

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

1 Answer 38 Views
Window
This is a migrated thread and some comments may be shown as answers.
Chris Gårdenberg
Top achievements
Rank 2
Chris Gårdenberg asked on 17 Sep 2010, 07:08 AM
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 =
GetWindow().BrowserWindow.radopen('randomPopup.aspx');
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 :)

Edit:

.setActive() does not work aswell. :) (In the Image-case)

1 Answer, 1 is accepted

Sort by
0
Georgi Tunev
Telerik team
answered on 21 Sep 2010, 03:38 PM
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');
                win.set_modal(true);
            }, 0);
        }
     
    </script>
    <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
Tags
Window
Asked by
Chris Gårdenberg
Top achievements
Rank 2
Answers by
Georgi Tunev
Telerik team
Share this question
or