Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / Browsers / Internet Explorer / October 2004



Tip: Looking for answers? Try searching our database.

Popup containing <select> won't close

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Joel Plofsky - 28 Oct 2004 07:36 GMT
The page below shows the problem.  When the popup is open and I click
outside the current browser window and outside the popup window, the
popup window remains open.  Is this an IE6 bug?  Is there a
workaround?

<HTML>
<HEAD>
</HEAD>
<script>
function openPopup()
{
 var popup = window.createPopup();
 popup.document.body.innerHTML = window.PopupBody.innerHTML;
 popup.document.body.style.border="solid 2px #333399";
 popup.show(0, 0, 500, 500, null);
}       
</script>
<body>
 <div id="PopupBody" style="display:none;">
  <select>
   <option id="option1" value="option1">Option 1</option>
   <option id="option2" value="option2">Option 2</option>
   <option id="option3" value="option3">Option 3</option>
   <option id="option4" value="option4">Option 4</option>
   <option id="option5" value="option5">Option 5</option>
   <option id="option6" value="option6">Option 6</option>
  </select>
 </div>
 <input type="button" value="Open Popup"
onclick="javascript:openPopup();">
</body>
</HTML>
Bob Barrows [MVP] - 28 Oct 2004 11:57 GMT
> The page below shows the problem.  When the popup is open and I click
> outside the current browser window and outside the popup window, the
> popup window remains open.  Is this an IE6 bug?  Is there a
> workaround?

I don't understand why you would expect it to close. I assume you chose to
use a popup because you wanted the user to take some action before allowing
the application to continue. Why should clicking outside the popup window
send some signal that the action has been taken?

Bob Barrows
Signature

Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"

Joel Plofsky - 28 Oct 2004 17:27 GMT
> > The page below shows the problem.  When the popup is open and I click
> > outside the current browser window and outside the popup window, the
[quoted text clipped - 7 lines]
>
> Bob Barrows

According to MSDN,

A popup object always closes when the user clicks away from it or when
another popup object is opened.

http://www.msdn.microsoft.com/library/default.asp?url=/workshop/author/om/popup_
overview.asp

Bob Barrows [MVP] - 28 Oct 2004 20:39 GMT
Hmm - I've never used the popup - I was  assuming it was similar to
showModalDialog, but now that I've read your link ...

See Brian's reply.

Bob Barrows
>>> The page below shows the problem.  When the popup is open and I
>>> click outside the current browser window and outside the popup
[quoted text clipped - 13 lines]
> A popup object always closes when the user clicks away from it or when
> another popup object is opened.

http://www.msdn.microsoft.com/library/default.asp?url=/workshop/author/om/popup_
overview.asp


Signature

Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.

Brian Staff - 28 Oct 2004 18:49 GMT
As far as I know IE has always worked that way. The popup does close though if
you click inside the browser, but outside of the popup.

I always thought it was strange behavior.

Brian
Joel Plofsky - 29 Oct 2004 13:45 GMT
> As far as I know IE has always worked that way. The popup does close though if
> you click inside the browser, but outside of the popup.
>
> I always thought it was strange behavior.
>
> Brian

It's very strange, especially since it seems to close fine when the
popup contains other element types such as buttons.  Any idea of a
workaround?  I tried responding to window.onblur, but it didn't work.
Brian Staff - 29 Oct 2004 18:57 GMT
> I tried responding to window.onblur, but it didn't work.

I tried that too...and I could not get it to work either

Brian
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.