Good evening everyone !!! I came to ask for a help from you. I'm building a .php page with html structure that contains an IFrame in your body. As soon as this .php page is opened, the iframe loads a web page that is not managed by me, but I can get the id's from its buttons, inputs, divs, etc. Well, there goes the question, is there any way to manage the activity on this webpage that is being loaded inside an iframe on my .php page? How can I capture the button clicks and input entries that are made on this web page? Please, if anyone knows, I am very grateful !!! I still do not understand much of javascript, but searching the sites of life I found this code below, I tried to implement the id's of elements of the web page, but it did not work. Note: id IFrame
is IFrame
of my page where the webpage is loading and ember516
is the id of an input of the web page.
<!DOCTYPE html>
<html>
<head>
<title></title>
<meta charset="utf-8">
<script type="text/javascript">
function sendDataToIFrame(){
var EUREKA = document.getElementById('IFrame').contentDocument.getElementById('ember516');
EUREKA.innerHTML = "EUREKA!!!";
}
</script>
</head>
<body>
<center><h3>VIDEOCENTER</h3></center>
<br>
<center><iframe id="IFrame" style="border:0; width:90%; height:900px; " src="linkdapáginaweb.html" frameborder="0" scrolling="no"></iframe></center>
</body>
</html>