You just don't have this function-type property in the object
window
in the browser you are using. This feature is deprecated and is going. Please see:
https://developer.mozilla.org/en-US/docs/Web/API/Window/showModalDialog[
^].
Don't use this function. There are many way better alternatives, such as jQuery dialog:
https://jqueryui.com/dialog[
^].
Note that such dialogs (there are many more components like that collectively known "modal popup", with different features, such as visual effects, transitions, etc.) doesn't show "real" popup, but mimic modal behavior on the same page, which is much better.
—SA