I'm new to JavaScript and I feel like I've hit a brick wall. I can do simple functions but I've run into a more complex issue and have no idea how to solve this.
Basically I have a HTML document called publish-an-ad.html
Inside this HTML page, I have the following iframe:
<iframe src="checkout-1.html" width="900" height ="500" id="myFrame"> </iframe>
And inside this iframe I have a button with a class, <button class="myBtn"> Proceed to checkout </button>
I want to create an alert in the parent page (publish-an-ad.html) that triggers when this button inside my iframe is clicked. I don't know how to do this because the parent and the iframe clearly don't seem to communicate, they act like two different entities.
Are there any simple solutions to this? Thank you.