-1

I am trying to redirect to external url. I use the below code.

<script>
window.location.href= "www.radar.com";
</script>

But it redirect the url to this http://localhost/webtask/www.radar.com. But I want to redirect to www.radar.com. I am unable to find the issue.Please help....

Benjamin Ray
  • 1,855
  • 1
  • 14
  • 32

1 Answers1

1

You needed to put the whole URL like below.

window.location = "http://www.radar.com";
Broomes
  • 11
  • 1