-2

I have a problem when programming for apps. I have a UI that displays but when I do a

<script type="text/javascript">
     window.location.href="http://mywebsite.com";
</script>

after I have done it my UI disappears, does the code overlap the UI or what is happening? Is there anyway around this?

lethal-guitar
  • 4,438
  • 1
  • 20
  • 40
MrFoffoloff
  • 23
  • 10

2 Answers2

0

No overlapping or anything that sort.

It is being redirected to the new url provided.

When that code is executed, it is redirected to http://mywebsite.com

window.location.href contains the current url and when you overwrite it, it will redirect to the new url provided to it.

Amit Joki
  • 58,320
  • 7
  • 77
  • 95
0

In window.location.href="http://mywebsite.com"; the browser navigates to the new URL supplied, i.e:http://mywebsite.com. that's why you may not be able to see your current UI.

for more reference see this post

Community
  • 1
  • 1
Sambit
  • 424
  • 6
  • 15