Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Overlay screen to collect email address on page load

Posted on 2013-01-04
3
Medium Priority
?
437 Views
Last Modified: 2013-01-16
Hello all experts.

I want an overlay window to open on page load (with the actual page behind it faded) so that I can collect email addresses.  So this overlay will have some content as well as a form with a textbox where they can enter their email address and press enter.

The "Thank You" page also shows up in the overlay.  Then they can close out the overlay.

They can close the overlay without doing any of the above too.

Can someone please help me with this..???

I have seen it on a few different sites out there.  My site is in PHP.

Thanx in advance.

--d.
0
Comment
Question by:driven_13
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 17

Accepted Solution

by:
selvol earned 2000 total points
ID: 38746403
You need Jquery Modal


http://www.queness.com/resources/html/modal/jquery-modal-window.html
http://jqueryui.com/resources/demos/dialog/modal-form.html

http://www.ericmmartin.com/projects/simplemodal-demos/
<!doctype html>
 
<html lang="en">
<head>
    <meta charset="utf-8" />
    <title>jQuery UI Dialog - Default functionality</title>
    <link rel="stylesheet" href="http://code.jquery.com/ui/1.9.2/themes/base/jquery-ui.css" />
    <script src="http://code.jquery.com/jquery-1.8.3.js"></script>
    <script src="/resources/demos/external/jquery.bgiframe-2.1.2.js"></script>
    <script src="http://code.jquery.com/ui/1.9.2/jquery-ui.js"></script>
    <link rel="stylesheet" href="/resources/demos/style.css" />
    <script>
    $(document).ready(function() {
        $( "#dialog" ).dialog();
    });
    </script>
</head>
<body>
 
<div id="dialog" title="Basic dialog">
    <p>This is the default dialog which is useful for displaying information. The dialog window can be moved, resized and closed with the 'x' icon.</p>
</div>
 
 
</body>
</html>

Open in new window


This is calling the pop up ONLOAD
    <script>
    $(document).ready(function() {
        $( "#dialog" ).dialog();
    });
    </script>

Open in new window


Selvol
0
 
LVL 16

Expert Comment

by:HagayMandel
ID: 38746433
Have a look at this demo
If you want it to load at page load, you only have to add the call for the toggleOverlay function accordingly:

<body onLoad="toggleOverlay()">
0
 

Author Comment

by:driven_13
ID: 38753296
Thanx for both of your responses.

Both of your solutions seemed do-able.....for someone who knew what they were doing...[:0(

I, on the other hand, do not.

So does someone already have this built as I cannot believe that someone did not need this exact same functionality at some point in the past.

Here, briefly, is what I am looking for:

Just an overlay screen that loads on page-load with the actual page behind it faded out. This overlay will have just one email-address field for collecting emails.  Needs the basic JavaScript error-trapping for this field.  When they fill out this field and hit submit, they are to be taken to the page that is in the "action" property of the form that is in the overlay window.

This secondary page does all the work of collecting the email address and generating the Thank You message.

Thanx again for your time.

--d.
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

In this article you'll learn how to use Ajax calls within your CodeIgniter application. To explain this, I'll illustrate how to implement a simple contact form to allow visitors to send you an email through your web site.
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
In this tutorial viewers will learn how to position items using CSS's three positioning types Create a new HTML document with an internal stylesheet.: Create another div in CSS and name it Absolute : Type "position:absolute;" and "top:10px; left:50p…
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…
Suggested Courses

670 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