Window.location.href in firefox

Could you tell me why it window.location.hrefdoes not work on firefox?

the code:

<script>

     function goToURL() {
           window.location.href('url');
     }

</script>

What can be used instead window.location.hrefas an alternative?

+4
source share
4 answers

This should work in both IE and FireFox:

window.location.assign(url);
+5
source

You use it, for example, as follows:

window.location.href = 'http://www.guffa.com';

I checked that this code works in Firefox 3.6.12.

If this does not work for you, you should be more specific in your question about what kind of problem.

+2
source

window.location = "http://...";

,

0

All Articles