How can I give the user an “Operation completed successfully” message with a proper icon using javascript ? I know I have alert() for errors and confirm() for confirmations, but is there a function for success ?
1. the 'solution' only works in IE, other browsers will see no alert window.
2. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html lang="en"> <head> <title>Simple popup</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<script type="text/javascript"> <!-- function showAlert(event) { // Scroll offset: var Ypos, Xpos; if (window.pageYOffset) Ypos=window.pageYOffset; else if (document.documentElement && document.documentElement.scrollTop) Ypos=document.documentElement.scrollTop; else if (document.body) Ypos=document.body.scrollTop;
if (window.pageXOffset) Xpos=window.pageXOffset; else if (document.documentElement && document.documentElement.scrollLeft) Xpos=document.documentElement.scrollLeft; else if (document.body) Xpos=document.body.scrollLeft;