Controlling another browser window

I have a set of static html files with their own links (essentially a
book). What I want to do is have another browser window that’s a sort
of companion tied to whichever window is viewing the book files, which
will update when a link in the book window is followed and also control
whether the book page can change. However, I’m not allowed to modify
the static files in any way.

What I do have is the right to serve the pages (eventually I might want
to do this via a proxy or similar method, but for now assume I have the
files locally). I could have a setup page that launches both windows
using Javascript and keeps a reference to the ‘parent’ that has the
book. Is there a way to pass that to Ruby code and maintain it for as
long as needed?

As an example of what I’m trying to do : If my book is, say
Shakespeare’s Julius Caesar, the second window might contain vocabulary
words, notes, errata, study questions, etc. Each time a page is turned
by clicking a link in the book, the second window would need to update;
if the user is in the middle of answering a question, then the book page
should not be allowed to change.

(I know there’s probably no way around going back in the browser;
that’s acceptable. This needs to be cross-platform, so shouldn’t rely
on controlling the browser directly.)

Something pretty close is described in this technique:
http://openid-demo.appspot.com/

I have used it to accept OpenID’s on a page.
(Which is backed by Ruby code).

So, possible each page would respond via callbacks.
Javascipt ‘switch’ statement therein.

Close, possibly a gotcha in there somewhere.

MarkT

Now that I think about it, maybe I can do something like this:

Open both the book page and the companion page separately. Then have
the companion page (using AJAX?) wait for updates to the book page. The
server can notify the companion page of what to do whenever the book
page changes.

That should be possible, right? My Javascript/AJAX knowledge is pretty
weak.