At 4:10 PM +0200 9/24/01, Karl Dubost wrote:
> When you ctrl+click, you have a contextual menu depending on the object under your 
>mouse pointer.

What do you do if the element under the pointer was created in DHTML via 
document.createElement?


> When you have a link, you have the possibility to "open it a new window" it would be 
>very practical to have the opposite for website with pop-up window link, to have 
>ctrl+click "open it in the same window".

While this would be possible for links which target a new window via <a target="foo"> 
(and IE would have to check and ensure that no frames existed in the current window so 
named) it would be difficult to predict whether or not clicking on a link would open a 
new window via JavaScript.

To robustly perform this task, IE would have to pretend to do perform a click action 
and then run all the code which fired as a result (href, onclick), in all the 
functions it called (but not actually 'run' any code which might change the look of 
the page) and see if at any point a new window opens. And even that might not be 
perfectly accurate. Consider the following (extreme/unlikely) example:

<span style="color:blue; text-decoration:underline" onclick="MaybeOpen()">
click me
</span>

...

function MaybeOpen(){
  if (event.clientX%2==0 && (new Date()).getSeconds()<30 && moonSliderReady)
    window.open(...);
  else
    self.location.href="...";
}


Clicking on this span (so IE would have to check not just anchors, but any object with 
an onclick event, or to which an onclick might cascade) would only open a new window 
when the mouse was aligned on an even pixel column, when the time is in the bottom 30 
seconds of every minute, and depends on some other variable called moonSliderReady 
(and who knows what other code is running to decide whether or not that will happen).

Because something like the above *can* exist, the minor feature to warn you in advance 
would be a monumental pain to detect, and most likely could not feasibly be done so 
that it always worked.



If popup windows are a wide-spread enough problem to warrant a solution, an 
alternative might be a preference like:
"When the page attempts to open a new window:
 (o) Allow it
 ( ) Disallow it (without warning)
 ( ) Disallow it (and play the sound [ Sosumi v])
 ( ) Open it in the main window instead
 ( ) Raise a dialog asking me what to do.
"
-- 
Gavin Kistner
User Experience Architect > Refinery, Inc.
[EMAIL PROTECTED] | 1.314.283.1443

To unsubscribe send mail to [EMAIL PROTECTED]
To search the archives: 
          <http://www.mail-archive.com/macie-talk%40lists.boingo.com/>

Reply via email to