Solved

Overlay screen to collect email address on page load

Posted on 2013-01-04
3
419 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 500 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

How our DevOps Teams Maximize Uptime

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us. Read the use case whitepaper.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Put check in your check box 7 16
Make checkboxes execute queries on click 8 31
Flex Messes  With Horizontal Positioning 2 22
Jquery driving me nuts... 14 27
I found this questions asking how to do this in many different forums, so I will describe here how to implement a solution using PHP and AJAX. The logical flow for the problem should be: Write an event handler for the first drop down box to get …
Building a website can seem like a daunting task to the uninitiated but it really only requires knowledge of two basic languages: HTML and CSS.
In this tutorial viewers will learn how to style elements, such a divs, with a "drop shadow" effect using the CSS box-shadow property Start with a normal styled element, such as a div.: In the element's style, type the box shadow property: "box-shad…
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)

763 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