Quantcast
Channel: Internet Explorer Web Development forum
Viewing all articles
Browse latest Browse all 3527

Javascript alert box is duplicated if moved in IE11

$
0
0

I have an issue with the javascript alert box in IE 11. If the user drags or moves the alert box, it creates a duplicate of that box. I am not facing this issue in IE8. This issue occurs only when a form action has link for other jsp and alert box is on the other jsp. If validation is done on same jsp then alert box can be dragged without opening duplicate alert. Is it a bug in IE11? Please help to fix this issue.

Login.jsp

<html>
<head>
<script>
function validateForm() {
    var x = document.forms["Login"]["fname"].value;
    if (x == null || x == "") {
        alert("Name cannot be empty...");
        return false;
    }
}
</script>
</head>
<body>
<form name="Login" action="AfterLogin.jsp"
onsubmit="return validateForm()" method="post">
Name: <input type="text" name="fname">
<input type="submit" value="Submit">
</form>
</body>
</html>

AfterLogin.jsp

<html>
<body>
<% 
String name=request.getParameter("fname");
if(name.equals("test")
{
%>
<script>
alert("Login success...");
</script>
<%
}
else
{
%>
<script>
alert("Login fail...");
</script>
<%
}
%>
</body>
</html>

The duplicate alert box issue is for "Login success..." and "Login fail..." alert box. If you continuosly drag this alert it will open mutiple alert box. This issue is not happenning for "Name cannot be empty..." alert box.



Viewing all articles
Browse latest Browse all 3527

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>