hi anu,
its very easy to have a mail popup..
i will tell u the way i have done this.
Divide the home page into frames.
let it has
. a top frame ( some links like back,logout)
. a left frame (for menu components)
. middle frame (for displaying the pages)
now divide the left frame into two
top frame with menu components
bottom frame for popup.
refresh the jsp (left bottom frame) every 1 or 2 minutes..u can find the java script code for page autorefresh on internet.check
www.dynamicdrive.com and in the jsp add a scriptlet to check if any new messages in the inbox
hmmm...i wll write the code
<%@ page import='CheckMailBean' %>
<% CheckMailBean mailbean = new CheckMailBean();
int newmail = mailbean.checkInbox(myID);
System.out.println("newmail = " + newmail);
String popup = null;
if (newmail > 0 )
{ popup = "<script> alert('new mail'); </script> ";
}
else
{ System.out.println("new mail count is ZERO");
}
%>
print that variable "popup" at the end of the jsp page after the </body> tag.. u can find codes for popup script on the above mentioned site .
is it clear..easy naa ???
raj
SCJP2