fuwsdotnet
10-16-2003, 11:57 AM
does anybody know anything about any bugs that IE may have with javascript redirects inside of a form. for example
=========================================
<form name=form onsubmit=redirect()>
<input type="text" name="text1" size="20"><br>
<input type="text" name="text2" size="20"><br>
<input type="submit" value="submit">
</form>
<SCRIPT language="JavaScript">
function redirect()
{
document.location.href = "index.html";
return;
}
</SCRIPT>
=========================================
put this simple code into a browser and run it in IE. IE just reloads the page and skips over the redirect. ANybody kow why this is? Now take this codee and run it in netscape. The page works just fine. If anybody knows of a fix for this or any ideas why this does not work in IE would be greatly appreciated.
john
=========================================
<form name=form onsubmit=redirect()>
<input type="text" name="text1" size="20"><br>
<input type="text" name="text2" size="20"><br>
<input type="submit" value="submit">
</form>
<SCRIPT language="JavaScript">
function redirect()
{
document.location.href = "index.html";
return;
}
</SCRIPT>
=========================================
put this simple code into a browser and run it in IE. IE just reloads the page and skips over the redirect. ANybody kow why this is? Now take this codee and run it in netscape. The page works just fine. If anybody knows of a fix for this or any ideas why this does not work in IE would be greatly appreciated.
john