473,218 Members | 1,473 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,218 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 3174


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...
1
isladogs
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...
0
by: veera ravala | last post by:
ServiceNow is a powerful cloud-based platform that offers a wide range of services to help organizations manage their workflows, operations, and IT services more efficiently. At its core, ServiceNow...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 3 Jan 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). For other local times, please check World Time Buddy In...
0
by: mar23 | last post by:
Here's the situation. I have a form called frmDiceInventory with subform called subfrmDice. The subform's control source is linked to a query called qryDiceInventory. I've been trying to pick up the...
0
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
0
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....

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.