Hi,
I'm working on a substantial AJAX-type application. The latest feature
I've added is the ability to append a query string to the end of the
normal URL, which will cause the application to open a new tab (within
itself, not a browser tab) according to the contents of this string,
alongside the normal tabs it provides. This all works as expected.
What I would now like to do is provide the ability to open a second such
tab alongside the first, without leaving the application (it has an
unfortunately long startup time due to a slow server I have no control
over). My initial plan was to trap onbeforeunload (which I already do to
provide a "do you want to quit?" dialog), see what the new URL is, and
if it's the URL of the application but with a different query string,
cancel the unload and create the new tab instead.
Of course, this doesn't work, and there are a couple of perfectly good
reasons why it never could have done. But does anyone have a suggestion
for a different approach?
Thanks,
Pete