Generating Popup Windows as Prompt Dialog Boxes

Q

How to generate popup windows as prompt dialog boxes?

✍: FYIcenter.com

A

If you want to generate a popup window as a prompt dialog box, you can use the window.prompt() method. See the following JavaScript code outline:

<a href="javascript:pWindowPrompt();">Click your ...
...
<script language="JavaScript">
/*
*  Popup Blocker Test - P_WINDOW_PROMPT
*  - Popup Windows in Forms of Prompt Dialog Boxes
*
*  A popup window shows up in the form of a prompt dialog 
*  box. JavaScript codes implemented to call the prompt 
*  method.
* 
*  Version of 2007.01.01
*  Download at http://sqa.fyicenter.com/tools/
*  Copyright (C) 2007 FYIcenter.com. All rights reserved.
*/
function pWindowPrompt() {
   fyicenterData = window.prompt('What is your favorite W...
}
</script>

You can also visit Popup Blocker Test - P_WINDOW_PROMPT page to get the complete source code and to see how it works.

2007-01-17, 8361🔥, 0💬