In need of a good jQuery/JavaScript popup overlay

Posted on 2011-10-11
Last Modified: 2012-05-12
Hi all,

I'm hunting around for a decent script for html popup overlays - the type that darken the background to make it the focus.

It doesn't have to be bells & whistles but something clean and efficient (works in all borwsers) that I can do things like quick signup forms in - so posts to a confirmation page within the same popup.

If anyone has any experience with some they use with good effect and any pointers into integrating a form -> post -> confirmation in the popup format would be much appreciated.

Question by:dolythgoe
    LVL 15

    Accepted Solution

    LVL 20

    Assisted Solution

    by:chaitu chaitu

    Author Comment

    Thanks for this - it doesn't seem to darken the background and is there a way to load HTML into it?
    LVL 20

    Expert Comment

    by:chaitu chaitu
    when the page is loading add this div to the form and give some class to it.
    $(document.forms[0]).append('<div class="modalPageMask"></div>');
    		//when the modal window comes show the mask in the background
    		window.showModalDialog(url, arguments, options);
    		//if you close the window then hide the class.
    	left: 0;
    	position: absolute;
    	text-align: center;
    	top: 0;
    	width: 100%;

    Open in new window

    LVL 81

    Expert Comment


    Author Comment

    Thanks all - I'm having a bash at the first link -

    Could someone give me some advice on the later part of the question - form posting. I have this code for the popup working ok:

    	<script type="text/javascript">
    	$(document).ready(function() {
    		var $dialog = $('#signup')
    				autoOpen: false,
    				title: 'Quick Signup Required',
    				draggable: false,
    				modal: true,
    				resizable: false,
    				width: 420,
    				height: 400,
    				position: ['center',150]
    		$('#opener').click(function() {
    			// prevent the default action, e.g., following a link
    			return false;

    Open in new window

    It loads signup.php fine and displays the HTML but the way in which it's done confuses me when it comes to the form posting to a new .php page but staying within the window.

    Can anyone shed some light ont his - much appreciated!

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Join & Write a Comment

    Both jQuery and Mootools offer some nice, easy to use scripts. Mootools is best known for their interactive slideshows and jQuery for their menus, but both have many other uses as well.   jQuery is basically a toolkit with many DOM (http://en.wik…
    This article discusses the difference between strict equality operator and equality operator in JavaScript. The Need: Because JavaScript performs an implicit type conversion when performing comparisons, we have to take this into account when wri…
    The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
    The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

    746 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    16 Experts available now in Live!

    Get 1:1 Help Now