In the code below, I am using QueryString to check the variable status.
If it is 'success' then it should display "deletion successful".
I am passing url = http://localhost:9999/EmModule/EmpForm.jsp?status=success
But, it is not displaying any alert.
Note: I am using JSP page, and am rookie in it.
Thank You
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
<script type="text/javascript">
function scheck()
{
var s=Request.QueryString("status");
alert(s);
if(s=="success")
{
alert('Deletion Successful');
}
}
</script>
</head>
<body onload='scheck()' >
<h1> Insert Employee Data </h1>
<form action="Employee" method="POST" onsubmit="return validate_form(this)">
<table border="1">
<tr>
<td>Name</td>
<td><input type="text" name="EName"/></td>
</tr>
<tr>
<td>Department</td>
<td><input type="text" name="Dept"/></td>
</tr>
<tr>
<td>Address</td>
<td><textarea rows="2" cols="20" name="Add"></textarea></td>
</tr>
<tr>
<td>
<input type="submit"/>
</td>
</tr>
</table>
</form>
</body>
</html>