Jump to content

simple popup box


RuliTheHat
 Share

Recommended Posts

Is there a way to make a simple popup box without any buttons using javascript? I am aware of the alert and confirm boxes etc, but they all contain buttons... I need only to inform users that they will be logged out after a period of time due to inactivity.

Link to comment
Share on other sites

Sure... On that particular page or where needed, create a div for example and design/style it to your needs/looks for that page and have it display: none via css when the page loads. Then when needed for whatever reason, use javascript and css to display it somewhere on the page; for example the top or center. You can even dim the background like some sites do giving it a nice effect when you have the pop up appear. Don't forget to give the user a way to close the pop up, like an X or something in the corner. When they click on it, it will set the div(the pop up) to display: none; thus disappearing.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...