Share this page 

Open a window with no menu, toolbar or statusTag(s): Language


<HTML><HEAD> 
<SCRIPT Language = "JavaScript"> 
function simpleDialog(msg) { 
features = 
   'toolbar=no, location=no, directories=no, status=no, menubar=no, ' +
   'scrollbars=no, resizable=no, width=200, height=100' 
dlg = window.open ("","Dialog",features) 
dlg.document.write ("<HTML><BODY bgColor='black' text='white'>") 
dlg.document.write ("<H2><CENTER>",msg,"</CENTER></H2>") 
dlg.document.write ("<FORM><CENTER>") 
dlg.document.write 
  ("<INPUT type='button' value='OK' onClick = 'self.close()'>") 
dlg.document.write ("</CENTER></FORM></BODY></HTML>") 
dlg.document.close()
} 
</SCRIPT></HEAD> 

<BODY><FORM> 
<INPUT type='button' value = 'test simple dialog' 
onClick = 'simpleDialog("Click to close")'> 
</FORM></BODY></HTML> 

Try it :

Note : By default with Firefox, you cannot alter browser window status bar using javascript. In Firefox v1.5, this can be changed via Tools/Options/Content/Enable JavaScript/Advanced = Allow scripts to change status bar text and Hide the status bar