Various problems, NS versus IE + and - 
Author Message
 Various problems, NS versus IE + and -

OK I'm back --  maybe I can phrase my questions more clearly, and get
some answers.

I am building a pseudo-web-site, to burn into CD's for viewing using
what ever browser the recipient has (well -- Netscape or IE, anyway).  I
have hit a couple of problems with interactions between my main window
and pop-up windows.  (Please, no lectures about the evils of pop-up
windows, these are to show pictures of people mentioned in the text, to
display the equivalent of footnotes, and to give genealogical
information about the people -- this is a family history project.)

Problem 1: each time I use a particular (named) pop-up I want to size it
for the contents, be it a picture or a list of children.  In Netscape
there is no problem, just call window.open with the appropriate
arguments and the window gets the right size, whether it is already open
or not.  In IE, for reasons which elude me, this doesn't work, and the
only way that I have been able to make it work is to first call
window.open with a dummy page, in case the window is not already open,
then window.close (in case it was already open) and the window.open
again, with the correct parameters, otherwise it seems to ignore the new
size values.  (If there is a better way PLEASE tell me.)  Now in general
this is OK, if a bit kludgy, but when a pop-up window wants to change
it's own contents and size if dies in IE, because it closes itself, and
then, of course, it can't open itself anymore, 'cause it ain't there.

Any good work-arounds for this????

Problem 2: There are cases when a pop-up window needs to link to a
particular page, with an anchor, in the main window.  If the main window
is displaying a different page, then the desired page is loaded and
positioned at the anchor and (because it thought I anticipated this
problem) calls focus on itself at the end of the page.  Fine, except if
the page in question is already loaded in the window, all that happens
it that it repositions, to the anchor, but since it isn't being loaded
it never calls focus.

If I knew, for sure, that the window was open (the viewer could have
closed it after all), then I could call windowname.focus before the
link.  But I haven't found a way to tell if a window is open.

On the other hand, I have no way of knowing if a call to focus, in the
linking window (as opposed to the window being linked to) would even be
executed if it followed the link.  There just doesn't seem to be any
standards that I have found for the order of execution when multiple
windows are involved.

Again.  Does anyone know how to do this?

Cyril N. Alberga



Thu, 06 Feb 2003 03:00:00 GMT  
 Various problems, NS versus IE + and -


Quote:

> OK I'm back --  maybe I can phrase my questions more clearly, and get
> some answers.

> I am building a pseudo-web-site, to burn into CD's for viewing using
> what ever browser the recipient has (well -- Netscape or IE, anyway).  I
> have hit a couple of problems with interactions between my main window
> and pop-up windows.  (Please, no lectures about the evils of pop-up
> windows, these are to show pictures of people mentioned in the text, to
> display the equivalent of footnotes, and to give genealogical
> information about the people -- this is a family history project.)

> Problem 1: each time I use a particular (named) pop-up I want to size it
> for the contents, be it a picture or a list of children.  In Netscape
> there is no problem, just call window.open with the appropriate
> arguments and the window gets the right size, whether it is already open
> or not.  In IE, for reasons which elude me, this doesn't work, and the
> only way that I have been able to make it work is to first call
> window.open with a dummy page, in case the window is not already open,
> then window.close (in case it was already open) and the window.open
> again, with the correct parameters, otherwise it seems to ignore the new
> size values.  (If there is a better way PLEASE tell me.)  Now in general
> this is OK, if a bit kludgy, but when a pop-up window wants to change
> it's own contents and size if dies in IE, because it closes itself, and
> then, of course, it can't open itself anymore, 'cause it ain't there.

> Any good work-arounds for this????

Instead of closing and opening the window again and again, simply open it
again and resize it.

newWindow = window.open(....)
newWindow.resizeTo(640,480)

Quote:
> Problem 2: There are cases when a pop-up window needs to link to a
> particular page, with an anchor, in the main window.  If the main window
> is displaying a different page, then the desired page is loaded and
> positioned at the anchor and (because it thought I anticipated this
> problem) calls focus on itself at the end of the page.  Fine, except if
> the page in question is already loaded in the window, all that happens
> it that it repositions, to the anchor, but since it isn't being loaded
> it never calls focus.

> If I knew, for sure, that the window was open (the viewer could have
> closed it after all), then I could call windowname.focus before the
> link.  But I haven't found a way to tell if a window is open.

if (typeof(windowName)!='undefined' && !windowName.closed){
    windowName.focus()

Quote:
}

--
Thor Larholm


Fri, 07 Feb 2003 08:18:41 GMT  
 Various problems, NS versus IE + and -

Quote:



> > OK I'm back --  maybe I can phrase my questions more clearly, and get
> > some answers.

> > I am building a pseudo-web-site, to burn into CD's for viewing using
> > what ever browser the recipient has (well -- Netscape or IE, anyway).  I
> > have hit a couple of problems with interactions between my main window
> > and pop-up windows.  (Please, no lectures about the evils of pop-up
> > windows, these are to show pictures of people mentioned in the text, to
> > display the equivalent of footnotes, and to give genealogical
> > information about the people -- this is a family history project.)

> > Problem 1: each time I use a particular (named) pop-up I want to size it
> > for the contents, be it a picture or a list of children.  In Netscape
> > there is no problem, just call window.open with the appropriate
> > arguments and the window gets the right size, whether it is already open
> > or not.  In IE, for reasons which elude me, this doesn't work, and the
> > only way that I have been able to make it work is to first call
> > window.open with a dummy page, in case the window is not already open,
> > then window.close (in case it was already open) and the window.open
> > again, with the correct parameters, otherwise it seems to ignore the new
> > size values.  (If there is a better way PLEASE tell me.)  Now in general
> > this is OK, if a bit kludgy, but when a pop-up window wants to change
> > it's own contents and size if dies in IE, because it closes itself, and
> > then, of course, it can't open itself anymore, 'cause it ain't there.

> > Any good work-arounds for this????

> Instead of closing and opening the window again and again, simply open it
> again and resize it.

> newWindow = window.open(....)
> newWindow.resizeTo(640,480)

> > Problem 2: There are cases when a pop-up window needs to link to a
> > particular page, with an anchor, in the main window.  If the main window
> > is displaying a different page, then the desired page is loaded and
> > positioned at the anchor and (because it thought I anticipated this
> > problem) calls focus on itself at the end of the page.  Fine, except if
> > the page in question is already loaded in the window, all that happens
> > it that it repositions, to the anchor, but since it isn't being loaded
> > it never calls focus.

> > If I knew, for sure, that the window was open (the viewer could have
> > closed it after all), then I could call windowname.focus before the
> > link.  But I haven't found a way to tell if a window is open.

> if (typeof(windowName)!='undefined' && !windowName.closed){
>     windowName.focus()
> }

> --
> Thor Larholm

Thank you.  I gather from the first suggestion that execution still
resides in the calling window after the window.open for the new window.
I had tried this, but was told (a year or so ago -- don't have the
details) that either: control could pass to the opened window without
the resize being executed, or: the resize wouldn't work in IE until the
opened window had finished formatting, which was an indeterminate time
later.  If neither of these is correct, good, but can you confirm this?

Cyril



Fri, 07 Feb 2003 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Compatitibilty problem NS/IE

2. JScript Problem - IE/NS Incompatibility

3. Newsgroup dedicated to NS vs IE javascript?

4. Javascript Scroller for IE & NS

5. global variable to indicate NS or IE

6. Works in NS, but not IE (Japanese Characters)

7. close windows IE vs. NS

8. open windows in NS and IE?

9. which is better? IE or NS

10. onClick to open selection in new Window - NS 4 works, IE 4 Fails

11. onClick to open selection in new Window - NS 4 works, IE 4 Fa ils

12. <SPAN> with NS and IE

 

 
Powered by phpBB® Forum Software