1

How can I manipulate using JavaScript (JQuery) a site, not in my server, that I loaded in a frame?

1 Answer 1

5

I'm afraid you can't. The Same Origin Policy prevents it.

The same origin policy prevents a document or script loaded from one origin from getting or setting properties of a document from another origin. This policy dates all the way back to Netscape Navigator 2.0.

the only conceivable workaround is to fetch the page through a proxy on your own web server, and do the JavaScript operations on that. This, though, will destroy any relative links on the page, and is therefore usually not a workable approach without a lot of work (fixing relative links, etc.)

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.