I tried to google how to make an iframe trigger button on parent, but i cant make it work.
It's a button in the iframe called "bttnsubmit" that I want to trigger a button on parent called "bestilling". I've tried this:
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script>
$(function(){
parent.$(parent.document).trigger('bestilling');
});
</script>
<iframe height="100%" width="100%" padding="0px" src="https://booking.privatedriverapp.com/booking-form?lang=no" style="border:none;"></iframe>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script>
$(function(){
$(document).on('bttnsubmit', function() {
alert('event was fired');
});
});
</script>
Any help would be appreciated