Skip to content

Commit 374a57f

Browse files
committed
Fifty-Eighth Commit: Refactor Add Events web page to display message as popup to user for successfully adding an event to DB
1 parent d32d77c commit 374a57f

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

src/java/AddEvent.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,12 @@ protected void doPost(HttpServletRequest request, HttpServletResponse response)
6262
RequestDispatcher requestDispatcher = request.getRequestDispatcher("CreateE.html");
6363
requestDispatcher.include(request, response);
6464

65-
out.println("<br><center><h3> Event Added</h3></center>");
66-
System.out.println("Added to the database!!!");
65+
// out.println("<br><center><h3> Event Added</h3></center>");
66+
// System.out.println("Added to the database!!!");
67+
response.setContentType("text/html");
68+
out.println("<script type=\"text/javascript\">");
69+
out.println("alert('Success! ... Event Details Added To Database!');");
70+
out.println("</script>");
6771
con.commit();
6872
con.close();
6973
}catch(ServletException | IOException | ClassNotFoundException | SQLException e){

src/java/StoreP.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,10 @@ protected void doPost(HttpServletRequest request, HttpServletResponse response)
4444
String a3 = confirmUserPassword;
4545
String a4 = participantsName;
4646

47+
// if(){
48+
// }else{
49+
// }
50+
4751
if(a2.equals(a3)){
4852

4953
try{

0 commit comments

Comments
 (0)