The "View" button below will open a second small window, with some help text. This uses a function "test1()", which also gives the window focus after opening, in case it is already open and is hidden behind the current window.
The "Hide" button calls "test2()" which will only close the window if it has already been opened, thus avoiding errors. Also an unload of the page (eg. try doing a refresh) will also close the help window - this is done with the "UnLoad" on the BODY tag.
Try clicking Hide or Refresh before anything else - you shouldn't get an error.
- I have found that you may also need to close the
window first to avoid errors in IE 4 - "Access Denied". If so, just add a call
to test2() at the beginning of test1(). If anyone can explain this, let me know.
- Also, different versions of IE 4 act differently
- This is a real concern. At home I run IE 4.72.3110.8 (SP1) and all is well (apart
from above note). At work, I have IE 4.72.3110 (SP1;2636;2735;3241;2953) which seems
to open a new sub window each time I click View - and then gives RPC errors on Refresh or
close of the page. Yuk! Why can't things be a bit simpler - I thought that was
the whole idea.
- Netscape seems to work as expected.
- Your kilometerage may vary. Absolutely no
warranties, expressed or implied.
For more info mail me Kean Maizels