Neredbojias said:
With neither quill nor qualm, Richard Cornford quothed
Well, it's easy enough to determine if the user has
javascript activated and a window won't open.
You may say that but I have seen dozens of proposed examples of pop-up
blocker detectors (all actually not-pop-up bocker detectors with the
false assumption applied to the result) but none have ever taken account
of the full range of behaviour exhibited by pop-up blockers. And so all
of those examples would potentially error-out, either preventing the
completion of the test or producing false positive, or negative,
results.
Which is not to say that such a script could not be written to be
reliable, just that the individuals who are interested in creating such
scripts either don't research the issues sufficiently to see how they
should be implementing their test, or that they don't know how to
program their testes in a robust way (or a combination of the two).
One of the obvious problems with the creation of a good
not-pop-up-blocker detector is that the more experienced script authors
have figured out how they can get the pop-up effects and benefits
without trying to open new browser windows and so have no further
interest in detecting pop-up blockers. That leaves only relative novices
writing the detection scripts, and that is evident in the results.
Perhaps that's not *absolute* proof of a popup-blocker,
but, hey, I'll bet it's accurate 99+% of
the time.
It still depends on what it is you are trying to do. If it is a question
of verifying the viability of using pop-ups in a UI then the 'confirm
when loaded' strategy is 100% accurate. If you are planning to tell the
user that they must disable their pop-up blocker then the percentage who
never were running a pop-up blocker are going to think you a fool when
you ask them to turn it off. Some people don't mind their users thinking
them a fool, other would rather avoid giving that impression. (It might
be argues that the first group actually are fools, so fair enough)
It is probably a combination of experiences and personality but when I
create a test I don't want to get 99% of the answer.
And it's surely a valid programming technique.
That probably depends a lot on what you are programming, though I cannot
think of many tasks where a 1% failure rate would get past QA. And there
is no point writing code that will be rejected and need to be re-done
when you can be certain that is going to happen before writing it.
Richard.