开发者

Autofill a 3rd party textbox

Is there any way to automatically fill in a textbox on a 3rd party website via code on the referring page?

My situation is thus: When a user clicks the pager number in our online phone directory, I've been asked to have that number filled automatically on the third party's site. They have no API开发者_运维问答.

Certainly JavaScript can fill in the Textbox, but can I somehow do that from the referring 'href' tag?


You're essentially asking for a Cross site scripting vulnerability on the third party site. So no, you cannot fill the forms of third party pages unless they have a vulnerability that you can abuse, or if the page is originally designed to fill the form using parameters from the url.


Javascript won't be of any help because the 3rd party page won't be loaded until you click on a link. So the only way is to pass it as parameter:

<a href="http://3rdparty.com/action?value=some_value">Call 3d party</a>

This parameter needs to be interpreted by the 3rd party page and populate the text box. Even if you opened the 3rd party site in a new window or iframe you won't be able to manipulate it with javascript because it probably won't be hosted on the same domain as your site.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜