I am working on a plugin to modify a URL and update a page. The goal is to get the parent URL, modify it and then offer up a link that the user can click to go to the new URL. I am able to get the URL and display it, then modify the URL and display it. However, when I try to create a link using the ID, the link URL is to the index.html for the iframe, not the newURL id that I am referencing. I know I am overlooking something but I have been through a ton of HTML documentation and can't solve it. Any help would be greatly appreciated. Image of bad URL Thanks, Scott
<!DOCTYPE html>
<html>
<body>
<p id="currentURL"></p>
<p id="newURL"></p>
<a href="newURL">Click this link to update sort</a>
<script>
var myAssetsServer = "http://localhost:8080"
var startingURL = parent.document.location.href;
var myCustomSort = "imageSupplierImageID,assetType,filename";
var endingURL = myAssetsServer + "/app/#/search//" + myCustomSort + "/?" + startingURL.split("?")[1];
document.getElementById("currentURL").innerHTML =
"The original URL of this page is:<br>" + startingURL;
document.getElementById("newURL").innerHTML = endingURL;
</script>
</body>
</html>