• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

hooking to browser instance through javascript

 
Ranch Hand
Posts: 138
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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?
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
well you store a reference of the object

var newWin = window.open(...);

than you can reference the child with that variable

example of referencing the form of a child would be:

newWin.forms[0].elementName.value = "foo";

Eric
 
Ranadhir Nag
Ranch Hand
Posts: 138
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Eric.
But I had an idea that we can sink listeners only if the new page belongs to our domain.If we open a URL belonging to another domain,ther would be some security issues involved is what I hear.
Though I could not get any reference on that - can you comment?
 
Eric Pascarello
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You can not do cross domains. Major security risk.

The Firefox Extensions that do monitoring embed an iframe into the page and attach listeners that way.

Eric
 
Ranadhir Nag
Ranch Hand
Posts: 138
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can you point me to some refernce document which explains the extent of the problem - since we intend to provide a QA recording solution ,which would most definitely involve recording events on non-host domains,it would be nice if we can understand the issues involved before stroking down this approach.
Thanka a lot for the help again.
 
Eric Pascarello
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It is part of the spec that you can not do cross browser requests. It is so you can not read someones bank account. You might want to try to look through the ECMA docs or Mozilla Docs.

Eric
 
Ranadhir Nag
Ranch Hand
Posts: 138
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Does this mean that for cross-domain recording there is no javascript option available - but would have to go throgh the IWebBrowser route?
 
reply
    Bookmark Topic Watch Topic
  • New Topic