I have some code like this,
and now I want to redirect lik
tell you the true, I still don't get what you need, but
window.location(url);
should be
window.location = url;
a search on window.location reference will tell you that.