How to show up an alert on loading a JSP page which redirects to another pg
843835Apr 2 2003 — edited Apr 2 2003I want to show up an alert saying 'Item added to cart' when i click on the 'Add to Shopping cart' link.
Clicking on the link calls cart.jsp.
An excerpt from cart.jsp
<html>
<%@ page language="java" %>
<jsp:useBean id="cart" session="page" class="stoppe.beans.cartbean" />
<%
session=request.getSession(false);
cart.addProduct(request);
%>
<body onLoad="alert('Item added to the cart')">
<%
response.sendRedirect("store.jsp");
%>
</body>
</html>
But the alert never shows up.If i comment the response.sendRedirect() its showing up ofcourse showing a blank screen.How this could be done?.Anyone got a clue??.