Controlling another browser window

  • Thread starter Michael Winterstein
  • Start date
M

Michael Winterstein

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.)
 
M

Mark T

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

--=20
=E3=83=81=E3=82=A7=E3=83=83=E3=82=AF=E3=82=A2=E3=82=A6=E3=83=88=E3=81=8C=E3=
=80=81Jingle =E3=81=A0!
It's a Jingle Out There!
 
M

Michael Winterstein

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,065
Latest member
OrderGreenAcreCBD

Latest Threads

Top