• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: setting a browser window name in WebObjects
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: setting a browser window name in WebObjects


  • Subject: Re: setting a browser window name in WebObjects
  • From: Jonathan Rochkind <email@hidden>
  • Date: Thu, 07 Aug 2003 10:33:04 -0500

Well, this is ugly, but rather than try to name the first window, you could change the definition of the problem: Have the first window immediately open a NEW window, with the name you desire and the appropriate starting content, and then immediately close the actual original window. You could just embed javascript in the first page to do this automatically when the page is loaded.

Unfortunately, since you didn't open the original first window yourself, when the javascript tries to close it, most browsers will give the user an alert, amounting to: "script is trying to close this window, do you want to close it?" You could in fact just leave the first window open, with some simple message in it ("Thank you for using SuperWidgetPro, please see the main application window"), but open the second window, with your desired name and actual interactive content.

It's ugly and messy, but the only way I can think of to arrive where you want on any browser (so long as it does javascript).

--Jonathan

At 09:22 PM 8/7/2003 +1200, Denis Stanton wrote:
Hi Chuck

Thank you. Nice answer, and it almost works. (well it really does work, but not on my browser of choice)

Unfortunately it would appear that Safari does not understand the window.name setting. In Safari a link with target="mainWindow" will use an existing window that has been named mainWindow by being opened by a previous link that specified target="mainWindow". If no such window exists it creates one. It does not seem to recognise an existing window that has been named with <body onLoad="window.name='mainWindow';>

Perversely (from my point of view) Internet Explorer on Mac does what I want. If I let WO open my first window with <body onLoad="window.name='mainWindow';">, a later link with < target="mainWindow" ... will go back to that window.

After using Safari for some time IE, once my favourite, seems so ugly.
I don't want to go back to it. Since my client is likely to be Windows-based I suppose it doesn't matter. Maybe I should file a request for Safari


Thanks for you help

Any other suggestion as to how I can name the first browser window in Safari would be welcome.

Denis

On Thursday, August 7, 2003, at 04:51  PM, Chuck Hill wrote:

At 01:40 PM 07/08/2003 +1200, Denis Stanton wrote:

Now my problem. How do I give the first browser window opened by my app a window name?
I've used this once before for a similar problem.  To be honest, I don't
recall if it worked or not.  There was a lot of other funky stuff going on.
 Worth a quick try though...

Make the Body tag dynamic and add this binding:

onLoad = "window.name='mainwindow';"

A more nasty solution is to have the main window refresh every few seconds...


HTH

Chuck


--

Chuck Hill                                 email@hidden
Global Village Consulting Inc.
http://www.global-village.net

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.
_______________________________________________
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: 
 >Re: setting a browser window name in WebObjects (From: Chuck Hill <email@hidden>)
 >Re: setting a browser window name in WebObjects (From: Denis Stanton <email@hidden>)

  • Prev by Date: Re: WOMultipartFileIterator and 'wis' StreamActionRequestHandler
  • Next by Date: Session Timeout Page
  • Previous by thread: Re: setting a browser window name in WebObjects
  • Next by thread: Re: setting a browser window name in WebObjects
  • Index(es):
    • Date
    • Thread