0

Suppose I have a scenario where I have no control over a web page A, which has an input field that users can fill out. On the other hand, I have a web page B under my control which runs JavaScript. Is there a way to add JavaScript to page B so that it can load page A, wait for it to finish loading, and then automatically fill in the value of the input field with a certain value?

Antonio
  • 21
  • 4
  • simply add a query ?someValue=inputValueHere and on page B just check for this query https://stackoverflow.com/questions/66392987/sending-data-from-one-domain-to-another-using-javascript-i-have-access-to-the duplicate of this i guess – Zhivko Nikolov May 03 '23 at 07:57
  • You are not allowed to run your JavaScript on the other domain, except if they implement loading JavaScript from your server. Sometimes forms allow you to use GET request parameters, like `?name=Joe` to be in the URL. – Peter Krebs May 03 '23 at 07:57
  • So say web page A is the page of a bank with a bank transfer form. If this were allowed, you'd be able to just transfer money without the user knowing. – Ivar May 03 '23 at 08:00
  • @ZhivkoNikolov OP mentions that they don't have control over web page A. – Ivar May 03 '23 at 08:01
  • @Ivar well now I see, this is impossible. – Zhivko Nikolov May 03 '23 at 08:05

0 Answers0