Graham
Graham

Reputation: 1960

fill fields of iframe from another domain with js

What I'm trying to do is the following:

I have an iframe on my website from another domain but I don't like the way it is styled. Since it is not possible to alter the content of the iframe since it's from another domain I was wondering if the following approach would work.

I'm not going to show the iframe. The fields that are in the iframe are filled from fields on my page. This way I can style the form my own way.

Really hopes someone could tell me if this is possible or not

Upvotes: 0

Views: 123

Answers (2)

John williams
John williams

Reputation: 731

It's not possible and if it was it would be completely un-secure.

Upvotes: 0

Quentin
Quentin

Reputation: 943630

The fields that are in the iframe are filled from fields on my page

That isn't possible. The same origin policy prevents accessing the DOM of the other page to write your own content to the fields.

Upvotes: 1

Related Questions