Pop-Ups
Usage
A pop-up is used to show a message, ask input or make a choice
A pop-up can have multiple buttons or a custom layout
Creating pop-ups
Attributes
title
The title of the pop-up
String
message
The message to be shown
String
backdropClose
Whether the user can close the pop-up by clicking on the backdrop
Boolean
cancelText
The text the cancel button will be given
String
submitText
The text the submit button will be given
String
action
The page to send the data to
.php page
innerHTML is used as elements to be placed inside of a form for the pop-up
The default method for the pop-up element is POST
If action
attribute is used a Javascript FormData object
will be send to the onSubmit
event, nevertheless this event will always fire no matter what action is set
Functions
closePopup()
Closes the popup
HTML <pop-up> element
openPopup()
Opens the popup
HTML <pop-up> element
Events
onSubmit
Fires when a the submit button was clicked
FormData object
popupCancelled
Fires when the popup was either closed or cancelled
Last updated