I can not figure out the correct syntax for this. We have a series of maps (2020 - 2024). There is a Year selector to switch between them. The links are working as they should but they open in new windows instead of _self.
Coincidently, I was struggling with this problem earlier today… and I ended up not solving the problem, as I'm not sure if it's technically possible in my scenario.
But you, I think your problem is fixable… maybe.
So, I might not use window.open …instead I might use window.location.href or window.location.assign() …lots of discussion about which is best. So, sticking with just window.open the problem might be that you skipped the second parameter…
As @Photics suggested. window.location.href may work better.
But instead of trying to evaluate js in the onclick which can get confusing. have the onclick call a function , especially as you already have script tags in there, you may as well use them.
This will allow you to use the js syntax better with out worrying about evaluating strings to javascript.
Also , as he pointed out you are missing the second parameter "_self"