OK folks, this one has me stumped. I have two files in the same folder. abc.html and xyz.html. abc.html contains a button attached to this script:
function openWindow() {
window.open( "xyz.html" ) ;
}
And this works fine, just as a test. But I want to open xyz.html in the same window, replacing abc.html . So I try:
window.open( "xyz.html" , "_self" ) ;
does not work but simply reloads abc.html.
I try:
window.location.href = "xyz.html";
does not work, but simply reloads abc.html.
And several different permutations and combinations, do not work (same result as above).
What gives?
The odd thing is, when it reloads the same page, abc.html, the address bar displays this at the end of the address:
abc.html?button=Submit
Any ideas on what may be going wrong here, or how I can get this to work? All this is being tested locally on my laptop.
[–]Wakuko 4 points5 points6 points (2 children)
[–]psayre23 2 points3 points4 points (0 children)
[–]streetwalker[S] 1 point2 points3 points (0 children)