Download JavaScript Code Examples, Tutorials, Reference

Provide thousands of free JavaScript code examples, DHTML, HTML JavaScript Tutorials, Reference and Help. JavaScriptBank.com is the best JavaScript resources




Over 2000+ free Javascript
at JavaScriptBank.com Website

Sampled by JavaScriptBank.com
Important Note: Make sure you change the ID value in the form for each popup if you make multiple popups. Failure to do so will cause errors or the popups will not work correctly. Simply "closing" the popup will not work because the popup is never closed, just hidden.

Due to the number of support questions I have received on this subject, I have added a routine to automatically adjust the output code to allow for single and double quotes. Before, you had to manually escape those quotes or not use them at all. Now you can have any HTML content and not worry about making sure the content text will display right!



Popup horizontal position in pixels (X value):
Popup vertical position in pixels (Y value):
Popup width in pixels:
Popup height in pixels:
Popup unique element ID (no spaces):
Popup content. Can be lots of HTML text or a site URL. To display the site URL contents, the external flag below must be set, otherwise the popup will simply display the URL text.

Do NOT escape single or double quotes, the script automatically does this for you. If you do not know what this means, don't worry about it. :)
Popup content text color:
Popup content background color:
Popup content font style set. This value should be in valid CSS style sheet format:
Popup titlebar text:
Popup titlebar background color:
Popup titlebar text color:
Popup border color:
Popup scrollbar color in IE5+ only. This value is also the titlebar background color when the popup "loses focus":
Popup shadow color (black works best):
Will the popup be initially hidden?
Note: If this is set to yes, you will not be able to see the popup. Refer to the demo for more details.
Yes         No
Will the popup be draggable? Yes         No
Will the popup be resizable? Yes         No
Should older browsers simply display "normal" popup windows? Yes         No
Is the content area an external HTML page? Yes         No
Should this popup appear if the user returns to this page? Yes         No
Image URL for the minimize icon relative to where the script file is stored:
Image URL for the maximize icon relative to where the script file is stored:
Image URL for the close icon relative to where the script file is stored:
Image URL for the resize icon relative to where the script file is stored:


                     


Enter the values in the form above, click the Show Code button, select all the text that appears here, and paste into your page: