Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

hooking to a browser instance through javascript

Status
Not open for further replies.

ranadhir

Programmer
Nov 4, 2003
54
IN
We can use attachevent to listen to events on a document.
But we wish to open a new browser instance(window.open) and hook into the events of that particular browser instance-how do we do that?
We want to provide a recording functionality which allows us to record all user actions/navigations on a browser instance.
Is this possible through javascript?
 
If the document opened in the new window is on the same domain as the opener, you should be able to, yes.

Using window.open, you can get a handle to the window:

Code:
var winHandle = window.open(args);

You can then use this variable to refer to the new window anywhere you would normally use "window" (or an implied use of "window") to attach events.

Hope this helps,
Dan



Coedit Limited - Delivering standards compliant, accessible web solutions

[tt]Dan's Page [blue]@[/blue] Code Couch
[/tt]
 
Does this mean that for cross-domain recording there is no javascript option available - but would have to go throgh the IWebBrowser route?
 
I have no idea what the last part of your sentence means, but you are correct on the first part, yes.

The JS security built into most browsers prevents cross-domain scripting.

Dan



Coedit Limited - Delivering standards compliant, accessible web solutions

[tt]Dan's Page [blue]@[/blue] Code Couch
[/tt]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top