开发者

prefilling an iframe form from another domain

I'm trying to prefill a form that's located in another domain. I have the form in an iframe and I remember that javascript doesn't allow cross domain scripting, so how would I go about filling in a form that's located on another domain? Is it even possible?

I want to help my users by pre-filling certain information of the form that I've already collected in my registration page.

Furthermore, the iframe'd page has 2 forms, 1 that leads to another, so it would be nice if开发者_StackOverflow中文版 it's possible to fill both of them and emulate a submit button click, since everything they would need to submit is already collected by me, and it seems redundant to type the information twice.

EDIT: Since people have confirmed that it's impossible, do you know if there's a way to at least notify the browser to use autofill or an equivalent of FF's form fill, or IE's autocomplete?

Cheers,


No, it's not possible to access the forms in any way.

You can send information in the query string of the URL, and if the page supports it it can pick up that information and put it in the form.


You should rather look for an API or SSO-service of some kind. Maybe you and the other domain enterprise could join forces? If you share both information and goals there is bound to be opportunities.


If you are on the site itself, e.g. with the URL of the page with the form in your location bar, you can have a bookmarklet insert a jsonp script into the page that will fill the form with data from another server

Is that an option?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜