• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

"not to show again " on popup window

 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
how can i perform the following effect in java spring maven project. front end is using jsp.

first, user go to login page to input ID and password and click the LOGIN button to home page (home.jsp)
in the home.jsp page, it will prompt a pop up message (dim background) with close button on that message. once the user click the close button on popup message. it can browse the home page.

but i will bother the user it will prompt a popup message on every login. how can i prepare a checkbox on the popup message "not to show again" checkbox for the user profile. when the user "Tick" the checkbox and click close button, how can i set the value for that user profile?

can i use json to check backend program to save into database when user click checkbox and close button on popup message ?
any example? any code for reference?
 
Saloon Keeper
Posts: 15510
363
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Since you need to keep track of whether the user dismissed the pop-up, you either need to add a column to the table of users in the DB, or add another table for the pop-up.

Since the pop-up is only shown once when the user logs in, you can process the "pop-up dismissed" data on the server before the home page is served, and then just add the necessary pop-up script to the HTML that is served.

You can also do it with an AJAX request, but it's not necessary.
 
lo hailey
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Stephan van Hulst wrote:Since you need to keep track of whether the user dismissed the pop-up, you either need to add a column to the table of users in the DB, or add another table for the pop-up.

Since the pop-up is only shown once when the user logs in, you can process the "pop-up dismissed" data on the server before the home page is served, and then just add the necessary pop-up script to the HTML that is served.

You can also do it with an AJAX request, but it's not necessary.



yes. you are right. but how can i save the checkbox value when user click "close" button on the popup window.? how to call server side program when click "close" button.
now i am using javascript to hidden the "DIV" element in jsp.

any sample code for reference.
 
Ranch Hand
Posts: 93
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Nice example here:

don't show example
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic