I have a website( which im not owner of) which has a text box with Id = "idName". I have written a javascript function which has to fill the text box with my custom string :
function task() {
//Below is my webpage which has a textbox with id = "idName"
var popup = window.open("https://somewebsite.com");
popup.onload = function(){
document.getElementById("idName").value = "Hello World";
popup.location.reload();
}
}
But the text box is not filled with "Hello World", it is empty. What mistake am i doing here ?