JavaScript offers limited support for modal windows. The window.alert() method is fairly common, but there are other options as well. With window.confirm(), the user is presented with a Yes/No window. If Yes is clicked, window.confirm() returns TRue; otherwise, false. The preceding code (file confirm.html) uses this as the return value for a link, so if No is clicked, the link is not followed. Warning Note that this dialog is translated by browsers, so you should avoid text like "Click Yes to…" since users with a non-English system do not have a Yes button. |