473,320 Members | 1,945 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

closing a popup window in the new Opera 8

I have been lurking here for some time, and now would like to ask a
question of you clever coders:

My JustSo PictureWindow 3 Extension for Dreamweaver has stumbled in the
face of the new Opera 8. Jspw3 opens a popup window (using
varname=window.open(...)) but there are now two problems:

1) Opera8 interprets a top,left of 0,0 to be top left of the browser
window rather than of the entire screen, unlike the other modern
browsers I've run across.

1-Question) - is there a way to force window.open() interpret 0,0 as the
upper left corner of the *screen* in Opera8?
2) when my opening window's jscript attempts to close the popped window
using varname.close(), Opera8 throws a js error: "Type mismatch
(usually a non-object value used where an object is required)" (This
despite not attempting to close until this condition has been met:

"if
(varname && typeof varname=='object' && !varname.closed)
varname.close()"

2-Question) - any idea how to change the js in the opener so it can
close the popped window object without throwing that error?

Thanks so much.

btw, I've searched the Opera forums to no avail, altho there was some
discussion of a bug that sounds *possibly* related.
--

e michael brandt
michael at valleywebdesigns.com
www.valleywebdesigns.com ::: home of justso picturewindow & photoalbum

--
Jul 23 '05 #1
7 3182


E Michael Brandt wrote:
I have been lurking here for some time, and now would like to ask a
question of you clever coders:

My JustSo PictureWindow 3 Extension for Dreamweaver has stumbled in the
face of the new Opera 8. Jspw3 opens a popup window (using
varname=window.open(...)) but there are now two problems:

1) Opera8 interprets a top,left of 0,0 to be top left of the browser
window rather than of the entire screen, unlike the other modern
browsers I've run across.

1-Question) - is there a way to force window.open() interpret 0,0 as the
upper left corner of the *screen* in Opera8?
Opera treats popup windows not as independent windows but as windows in
another window where one window can host multiple documents (MDI). Thus
I don't think you can use script to position or move such a document
window outside of the boundaries of the main containing window.
It might be possible to change the settings of your Opera browser but I
am not sure how to do that. And of course changing the setting of your
browser does not help if someone visits your pages with Opera and you
want to position popups.
2) when my opening window's jscript attempts to close the popped window
using varname.close(), Opera8 throws a js error: "Type mismatch
(usually a non-object value used where an object is required)" (This
despite not attempting to close until this condition has been met:

"if
(varname && typeof varname=='object' && !varname.closed)
varname.close()"


I can't reproduce that problem here, perhaps you can post the URL to a
test case where we can see that problem.
--

Martin Honnen
http://JavaScript.FAQTs.com/
Jul 23 '05 #2
Thanks so much for helping with this.

<sigh> I was afraid you'd answer 1Q as you did </sigh>

For 2Q - here is a url: http://valleywebdesigns.com/test/testt.htm
Click the link on that page, note the debug alerts and that the popup
window opens fine. For this first test, do NOT close the popup window,
simply reclick the link on the opener page. Again the popup opens nicely
and all is well. But now CLOSE the popup and click the link again.
Note the debug values in the alerts and then the js error seen in the js
Console.

That test reveals the problem to be that !gJspw3Obj.closed yields TRUE
even when the popup window HAS been closed. So then when
!gJspw3Obj.close() fires, attempting to close an already closed window,
of course the error is thrown.

So, why does Opera8 report !gJspw3Obj.closed to be TRUE when the popup
window is in fact closed?

--

e michael brandt
michael at valleywebdesigns.com
www.valleywebdesigns.com ::: home of justso picturewindow & photoalbum

--

Martin Honnen wrote:


E Michael Brandt wrote:
I have been lurking here for some time, and now would like to ask a
question of you clever coders:

My JustSo PictureWindow 3 Extension for Dreamweaver has stumbled in
the face of the new Opera 8. Jspw3 opens a popup window (using
varname=window.open(...)) but there are now two problems:

1) Opera8 interprets a top,left of 0,0 to be top left of the browser
window rather than of the entire screen, unlike the other modern
browsers I've run across.

1-Question) - is there a way to force window.open() interpret 0,0 as
the upper left corner of the *screen* in Opera8?

Opera treats popup windows not as independent windows but as windows in
another window where one window can host multiple documents (MDI). Thus
I don't think you can use script to position or move such a document
window outside of the boundaries of the main containing window.
It might be possible to change the settings of your Opera browser but I
am not sure how to do that. And of course changing the setting of your
browser does not help if someone visits your pages with Opera and you
want to position popups.
2) when my opening window's jscript attempts to close the popped
window using varname.close(), Opera8 throws a js error: "Type
mismatch (usually a non-object value used where an object is
required)" (This despite not attempting to close until this condition
has been met:

"if
(varname && typeof varname=='object' && !varname.closed)
varname.close()"

I can't reproduce that problem here, perhaps you can post the URL to a
test case where we can see that problem.


Jul 23 '05 #3


E Michael Brandt wrote:
Thanks so much for helping with this.

<sigh> I was afraid you'd answer 1Q as you did </sigh>

For 2Q - here is a url: http://valleywebdesigns.com/test/testt.htm Click
the link on that page, note the debug alerts and that the popup window
opens fine. For this first test, do NOT close the popup window, simply
reclick the link on the opener page. Again the popup opens nicely and
all is well. But now CLOSE the popup and click the link again. Note the
debug values in the alerts and then the js error seen in the js Console.

That test reveals the problem to be that !gJspw3Obj.closed yields TRUE
even when the popup window HAS been closed. So then when
!gJspw3Obj.close() fires, attempting to close an already closed window,
of course the error is thrown.

So, why does Opera8 report !gJspw3Obj.closed to be TRUE when the popup
window is in fact closed?


Looks indeed like a bug in Opera 8, the property named closed becomes
undefined when the popup window is closed so you can't check it anymore
(and !undefined is true which is why you get that result). I have filed
a bug on Opera 8 using
<http://home.arcor.de/martin.honnen/operaBugs/op8/popupWindowClosedTest.html>
as a test case.

--

Martin Honnen
http://JavaScript.FAQTs.com/
Jul 23 '05 #4
Thank you for confirming this, and for submitting the bug report.

Now I'll have to make a decision about distributing a work-around for
this to all owners of JustSo PictureWindow3. Do you by any chance have
the pulse of Opera development? Enough to know if this is the sort of
thing they will fix quickly? or will it be months? Any idea at all?
--

e michael brandt
michael at valleywebdesigns.com
www.valleywebdesigns.com ::: home of justso picturewindow & photoalbum

--

Martin Honnen wrote:


E Michael Brandt wrote:
Thanks so much for helping with this.

<sigh> I was afraid you'd answer 1Q as you did </sigh>

For 2Q - here is a url: http://valleywebdesigns.com/test/testt.htm
Click the link on that page, note the debug alerts and that the popup
window opens fine. For this first test, do NOT close the popup
window, simply reclick the link on the opener page. Again the popup
opens nicely and all is well. But now CLOSE the popup and click the
link again. Note the debug values in the alerts and then the js error
seen in the js Console.

That test reveals the problem to be that !gJspw3Obj.closed yields TRUE
even when the popup window HAS been closed. So then when
!gJspw3Obj.close() fires, attempting to close an already closed
window, of course the error is thrown.

So, why does Opera8 report !gJspw3Obj.closed to be TRUE when the popup
window is in fact closed?

Looks indeed like a bug in Opera 8, the property named closed becomes
undefined when the popup window is closed so you can't check it anymore
(and !undefined is true which is why you get that result). I have filed
a bug on Opera 8 using
<http://home.arcor.de/martin.honnen/operaBugs/op8/popupWindowClosedTest.html>

as a test case.

Jul 23 '05 #5
On Sat, 21 May 2005 19:08:27 +0200, E Michael Brandt
<mi*****@valleywebdesigns.com> wrote:
Thank you for confirming this, and for submitting the bug report.

Now I'll have to make a decision about distributing a work-around for
this to all owners of JustSo PictureWindow3. Do you by any chance have
the pulse of Opera development? Enough to know if this is the sort of
thing they will fix quickly? or will it be months? Any idea at all?


It is a known bug and a regression, it should be fixed quite soon but I
can not promise that the fix will be in the next minor release, and I can
not suggest a timeframe. Sorry about the inconvenience caused!
--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
Jul 23 '05 #6
Hallvord R. M. Steen wrote:
E Michael Brandt wrote:
Thank you for confirming this, and for submitting
the bug report.
<snip> It is a known bug and a regression, it should be fixed
quite soon but I can not promise that the fix will be
in the next minor release, and I can not suggest a
timeframe. Sorry about the inconvenience caused!


Was it a good idea to let on that you work for Opera? ;-) You might
find yourself being held personally responsible for its shortcomings, or
being barraged with requests/complaints.

Richard.
Jul 23 '05 #7
On Wed, 25 May 2005 03:02:44 +0200, Richard Cornford
<Ri*****@litotes.demon.co.uk> wrote:
Was it a good idea to let on that you work for Opera?
No idea. Time will show :-p
;-) You might find yourself being held personally responsible for its
shortcomings, or
being barraged with requests/complaints.


Now, I work with QA so by definition I'm already personally responsible
for anything that is broken ø-)

Seriously I don't mind requests and complaints, and I hope I can now and
then help posters who need some help with Opera. Of course the
so-limited-it's-virtually-non-existant time I can afford spending on
newsgroups means that I won't really be a regular contributor, and I'm
afraid noone can *expect* a response because I may be too busy to follow
the newsgroup.

... it's always possible to register and use http://support.opera.com/
anyway :-)

--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
Jul 23 '05 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Obantec Support | last post by:
Hi i leached some code and strung together a popup i need for a page with 5 help buttons. Now i could use 5 scripts and pre-load the values but i would rather get a better understanding of how...
38
by: Shaun McKinnon | last post by:
HI...Here's my problem...I have a popup window that loads when i want it to, but it's not sized properly. I've set the size, but it doesn't seem to work. I've been on 8 different websites to find...
1
by: MJEASSOC | last post by:
I need some help with closing a popup window. I'm making an online portfolio, that has one base page with text and thumbnails. When a user clicks on a thumb, a new window opens containing a larger...
4
by: VR | last post by:
First, greetings to everyone :) I'm doing a university seminar & I've encountered a problem. I have a gallery with thumbnails linked on pictures. What I want is popup to be opened with...
7
by: Rich | last post by:
I have the following script on all pop up windows, would like to have this work on all newer browsers if possible. Right now it only works on MSIE & Opera. Not sure why. Any suggestions are...
4
by: Ed Jay | last post by:
I'm using the following simple js to open a popup window. var popwin; function launchwin(winurl,winname,winfeatures) { popwin = window.open(winurl,winname,winfeatures); } Using the following...
3
by: =?Utf-8?B?Vk1J?= | last post by:
How can I close popup window automatically when I close the parent window (the application itself)? Thanks.
3
by: simora | last post by:
Hi: Need some working sample code to post hidden form data from a php page to a new popup window. 540 x 500 centered. The popup that I'm calling already is formatted and has a TITLE:web-2007.php...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.