?
Solved

In need of a good jQuery/JavaScript popup overlay

Posted on 2011-10-11
6
Medium Priority
?
330 Views
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.

Cheers
0
Comment
Question by:dolythgoe
6 Comments
 
LVL 15

Accepted Solution

by:
Eyal earned 1200 total points
ID: 36947304
0
 
LVL 20

Assisted Solution

by:chaitu chaitu
chaitu chaitu earned 800 total points
ID: 36947513
0
 

Author Comment

by:dolythgoe
ID: 36947590
Thanks for this - it doesn't seem to darken the background and is there a way to load HTML into it?
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 20

Expert Comment

by:chaitu chaitu
ID: 36947670
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
	      $('.modalPageMask').show();
		window.showModalDialog(url, arguments, options);
		
		//if you close the window then hide the class.
		$('.modalPageMask').hide();


.modalPageMask{
	background:#666; 
	z-index:4000;
	left: 0;
	position: absolute;
	text-align: center;
	top: 0;
	width: 100%;
	display:none;
	}

Open in new window

0
 
LVL 83

Expert Comment

by:leakim971
ID: 36947853
0
 

Author Comment

by:dolythgoe
ID: 36948270
Thanks all - I'm having a bash at the first link - http://jqueryui.com/demos/dialog/#modal

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')
			.load('signup.php')
			.dialog({
				autoOpen: false,
				title: 'Quick Signup Required',
				draggable: false,
				modal: true,
				resizable: false,
				width: 420,
				height: 400,
				position: ['center',150]
				
			});

		$('#opener').click(function() {
			$dialog.dialog('open');
			// prevent the default action, e.g., following a link
			return false;
		});
	});
	</script>

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!
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
This article discusses how to implement server side field validation and display customized error messages to the client.
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…
Suggested Courses

809 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