Change the primary URL route from an iframe


I need to change the main URL of the page where an inframe is hosted, I did it in the following way, but I only change the url of the iframe but not the page where the iframe is hosted, how could I do this? I appreciate help

 var loc = window.location;
var pathName = loc.pathname.substring(0, loc.pathname.lastIndexOf('/') + 1);
var route= loc.href.substring(0, loc.href.length - ((loc.pathname + + loc.hash).length - pathName.length));
var menu ="menu.html"
asked by Jcastillovnz 12.11.2018 в 19:31

0 answers