views:

200

answers:

1

I have a page with a frameset, where I would like Javascript in one frame to access the selected text and location of the document in the other frame. I can do this using the getSelection() function and document.location parameter, but ONLY if the other frame is served by my local server. The javascript code returns null strings if the other frame comes from some other server e.g. amazon.com. What is the cause for this, and how can I get around it?

+2  A: 

It's part of the security model built into browsers. There's no way around it as far as I know.

Peter Bailey