index.html with this code
<iframe src="other.html" width="100%" height="600px"></iframe>
<input type="button" id="btnOutside" value="Click me"/>
In the other.html I have this code:
<input type="button" id="btnInside" value="Other Click"/>
<script type="text/javascript">
$(document).ready(function() {
$("#btnInside").click(function () {
alert('inside');
});
});
</script>
I am trying to make that the outside button trigger the inside button like this in the index.html
<script type="text/javascript">
$(document).ready(function() {
$("#btnOutside").click(function () {
$("#btnInside").click();
});
});
</script>
But is is not working. What can I do??