...">

Javascript works on IE but not firefox window.navigate ()

<input type="button" value="Back" onClick="window.navigate('http://www.google.com')">

This works in IE8, but not in firefox or opera. Does anyone know why and how to fix it?

+4
source share
5 answers

If you check the documentation for this method , you will see quite frequent:

There is no public standard that applies to this method.

This means that this is a non-standard feature that most likely only works in Internet Explorer.

This will work:

<input type="button" value="Back" onclick="window.location.href='http://www.google.com';">

If you are using XHTML:

<input type="button" value="Back" onclick="window.location.href='http://www.google.com';" />
+8
source

.navigate () only works in IE.

Try setting window.location.

window.location.href = 'http://www.google.com'
+4
source
<a href="http://www.google.com">Google</a>

& hellip; "" - . , JS IE . URL- . Forward.

+2
<input type='button' value='click' onclick="window.location='http://google.com';" />
0

: , , , sumbit. . , event.preventDefault()

0

All Articles