Don't use
showModalDialog()
; this is not a standard function; and don't use
window.open
— in most cases, popups are ugly, intrusive, and will be blocked by many users through appropriate browsers' plug-ins.
Better use the jQuery with so-called
modal popup technique which only mimic modal behavior on the same page. It makes UI really neat and is suitable for single-page applications. Please see:
https://jqueryui.com/dialog[
^].
Also, there are many 3-rd party plug-ins featuring different visual effects, such as transitions and, notably,
dimming:
http://bfy.tw/Vdm[
^].
If you need to learn jQuery (highly recommended), please see:
http://en.wikipedia.org/wiki/JQuery,
http://jquery.com,
http://learn.jquery.com,
http://learn.jquery.com/using-jquery-core,
http://learn.jquery.com/about-jquery/how-jquery-works (start from here)…
—SA