I have a button contained within a sem_menu2.html page which in turn this page is contained within an iframe, how can I create a function that, once the button is clicked, returns me the name of the file contained in an href?
<div class="col-sm">
<a target="frameapplication" href="/pages/applicazione.html">
<button class="btn btn-outline-secondary" onclick="loadPage()">
<i class="fa fa-cc-visa icon-button"></i>
<h5 class="text-button">Clienti con Modalita' di Pagamento Carta Credito</h5>
</button>
</a>
</div>
This function is incorrect because it does not return what I asked for.
function loadPage(){
var newURL = window.location.pathname;
window.open(newURL);
}