setting a browser window name in WebObjects
setting a browser window name in WebObjects
- Subject: setting a browser window name in WebObjects
- From: Denis Stanton <email@hidden>
- Date: Thu, 7 Aug 2003 13:40:07 +1200
I have a problem with assigning a name to a window so that it can be
the subject of a targeted link. It's as much an html issue as a WO
one, but maybe someone with a clearer head can advise.
In my WO application I need to be able to open a small browser window
to show some details of an item, and then either just close it or click
a button to return to the main window.
I accomplish this by putting the link to the small window in a
JSModalWindow object. This allows me to specify windowName = "detail"
(the "target" in html terms) and specify height, width, absence of
scroll bars etc. If I merely added a target to a hyperlink I wouldn't
be able to control the size. I need to use a separate named browser
window like this so that the main full-screen window stays visible. If
I click on another selection on the main window it will re-use the
small window if it exists, or make it if it doesn't. The client will
probably have two monitors, with one showing only the main window. So
far so good.
If the user makes some change to the details in the small window then
he needs to be able to tell the main window to update. I do this with
another JSModalWindow object in the detail window which has windowName
= "mainwindow" with height and width = 0 (this just means don't change
the dimensions).
Now my problem. How do I give the first browser window opened by my
app a window name? It has to have a name so that I can specify it
later in my JSModalWindow call to return from the detail window. I
don't know how to tell a WO component what it's window name is. I can
only assign a name when opening a window from another one. How do I
name the first one?
I can work around this by making every link on my first welcome screen
specify windowName = "mainwindow". From then on I can pop backwards and
forwards between "detail" and "mainWindow" but the trouble with this is
I always have the original welcome window open as well. If the user
clicks something else on the unnamed welcome window he it gets
confusing.
It gets messier of the user leaves the system for a while and then
decides to re-enter the site. His new welcome window will have links
to "mainWindow", but since an old "mainWindow" is still on the screen
the browser will bring it to the front showing the old data. While the
WO server is busy figuring out what to display in this window the user
is happily (or unhappily) reading and clicking on outdated stuff.
So is there a way of setting the name of the first window opened by
WebObjects?
Thanks for reading such a long description of what should be a simple
scenario
Denis
Denis Stanton
email@hidden
Home: (09) 533 0391
mobile: 021 1433622
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.
References: | |
| >ODBC drivers (From: Alvaro Muir <email@hidden>) |