javascript not to open in new window
I ran into a script that fits my needs, but there's just one thing. The code makes it open in a new window, where I also have to write the headers.
Is it possible to have the script open in the same window, with the same headers as the page where the script is activated from (so it replaces the form where this script gives the results of).
Here's the original code:
Code:
var newWindow;
var newContent = "<html><head><meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\"><title>here's my title</title><link rel=\"stylesheet\" type=\"text/css\" href=\"css/style.css\" media=\"screen\" /></head><body><div class=\"container margin-top-70 margin-bottom-90\"><div class=\"row margin-bottom-60\"><div class=\"col-md-12\">";
function makeNewWindow(){
newWindow = window.open("", "numbers", "");
}
and a bit further:
Code:
newContent += "</body>\n</html>";
newWindow.document.write(newContent);
newWindow.document.close()
}}
newContent += "</div></div></div></body></html>";
Here's the full js file: https://www.lichaamengeest.be/scripts/numerologie.js
Something to do with window.location.href, but can anyone help me out, please? Thanks!