Forum Moderators: open

Message Too Old, No Replies

Redirect content from browser window A to window B?

         

carpediem02140

5:13 pm on Jun 17, 2005 (gmt 0)

10+ Year Member



Let's say I open 2 browser windows, window A and window B. If I use window A to request www.yahoo.com, how do I redirect the HTTP response to display the Yahoo content in window B?

Some preliminary ideas I have:

1) A socket-level approach? I understand that each browser window opens a socket for each request/response. Can I manipulate the socket for window A to direct the content to a socket for window B?

2) A higher-level Javascript/Java approach? Maybe a command like "onload(move-content-to-window-B);"?

3) Would it be any easier to open a new browser window to display the content, instead of re-directing to an existing window? In other words, forcing the browser A to automatically open a new window for every HTTP response that it receives? How to do this?

Many thanks in advance!

--Won

Sathallrin

6:07 pm on Jun 17, 2005 (gmt 0)

10+ Year Member



First.. Have your second window open as windowB:

myWindowB = window.open('', 'WindowB', 'location=yes,toolbar=yes,menubar=yes,directories=yes,status=yes,resizable=yes,scrollbars=yes,height=undefined,width=undefined', false);

Then use something like:

myWindowB.document.write(documenthtml);

where documenthtml is a variable where you set all the html of the page you want.