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

RadAjaxPanel and javascript .close()

3 Answers 72 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
tman
Top achievements
Rank 1
tman asked on 30 Apr 2008, 12:46 AM
Here is a neat and somewhat obscure bug for you, courtesy of our intrepid QAs. 
Preparation:

Open up IE7.  Go to Tools->Internet Options->Tabs Settings and select 'When a popup is encountered always open popups in a new tab'

Next, you are going to need two aspx pages, one of which (TestPopup.aspx) opens the second (Popup.aspx) as a popup using client-side javascript (window.open()).  Popup.aspx should have an asp:button that calls window.close().  Make sure that the button is inside of a RadAjaxPanel.

Repro:

1. Open your browser and go to TestPopup.aspx.  Popup.aspx should open in a new tab.
2. Close popup.aspx using the asp:button that calls window.close.
3. Repeat steps 1 and 2.

Expected: things should work normally

Actual: you will no longer be able to navigate to any page on your webserver.  You will still be able to navigate to pages at outside URLs but all links to the server you ran the popups on will not work until you reset IE7.  You can still navigate to links from other browsers or computers normally.

Strange, eh? I can provide the source code if you want.


3 Answers, 1 is accepted

Sort by
0
Todd Anglin
Top achievements
Rank 2
answered on 30 Apr 2008, 03:16 AM
tman-

That's definitely an interesting and obscure problem! It sounds like you've already got a good proof-of-concept demo prepared, so if you can submit that to us in a support ticket and reference this forum thread, we'll be happy to take a look and see if we can reproduce the problem.

I'm curious, though. How are you configuring the window.close() function on your button in the RadAjaxPanel? I assume the button just a standard button with no runat=server, but I want to be sure. If that is the case, the RadAjaxPanel should become irrelevant.

In any event, send us your test app and we'll take a look.

-Todd
0
tman
Top achievements
Rank 1
answered on 30 Apr 2008, 05:49 PM
Yeah it is an odd bird, though not one that probably will come up very often.  I don't have a support license so I couldn't make a ticket, but I sent an email to support(at)telerik(dot)com with the files. We fixed it by simply taking the button outside the panel, but your suggestion to remove the runat="server" (which was there) is also good and probably more flexible.  Enjoy!
0
tman
Top achievements
Rank 1
answered on 01 May 2008, 01:43 PM
<admin>attachment added by Telerik staff</admin>

Hello Todd,

I actually did have runat=”server”, because of some previous functionality that we have since removed… I fixed the problem by just placing the button outside the panel but it is good to know that it can probably be fixed that way as well.

I tried to create a support ticket and my account is not associated with our company support license. In any case, we have solved the problem by keeping the button outside the panel so I don’t think we need a ticket. I suspect you might still be interested in the behavior however so I am attaching our test files.

Best,

Donald
Tags
Ajax
Asked by
tman
Top achievements
Rank 1
Answers by
Todd Anglin
Top achievements
Rank 2
tman
Top achievements
Rank 1
Share this question
or