![]() |
|
|
|||||||
| Home | Chat | Register | FAQ | Calendar | Mark Forums Read |
| General Development General Development |
|
|
Thread Tools | Display Modes |
|
||||
|
Does anybody have code that will automatically "pop-up" a section on a page for a user to enter his email address or click cancel before using the page?
The usage is to collect email addresses of visitors to affiliate pages. .
__________________
A whole lotta woman - a woman you can love all night long and never love the same spot twice... |
|
||||
|
After clumsily searching around for a while (I didn't understand the jargon to use in the search), I found the solution here:
http://www.dynamicdrive.com/dynamici...dhtmlmodal.htm Basically I want the "sign up for our newsletter" demo to automatically load when a person visits the page. So I should be able to adapt that code to do what I want fairly easily. When I get it working, I will post a link to the code here. Basically what I am after is a sort of a pop-up that can not be blocked, but the user can just click X or a "no thanks" button if he doesn't want to sign up. .
__________________
A whole lotta woman - a woman you can love all night long and never love the same spot twice... |
|
||||
|
You might want to make sure that it will work if Javascript is turned off.
An alternative could be to use a simply form script, which, when the user completes - they are then simply redirected to whatever page they should go to, and the info from the form can either be stored in a database or emailed to you.
__________________
"She thinks I'm a nice guy. Women always think I'm nice. But women don't want nice. Why is nice bad? What kind of a sick society are we living in when nice is bad?" George Costanza |
|
||||
|
Quote:
I got it working somewhat so far, here is my demo: http://sr0.org/modal/ Now just to modify it so that I can collect the email addresses... Stay tuned. .
__________________
A whole lotta woman - a woman you can love all night long and never love the same spot twice... |
|
|||
|
Very nice.
__________________
"In a high building there is so much to do..." |
|
||||
|
OK, I've got it cleaned up and accessible via PHP now.
You can download it at http://sr0.org/modal.zip The submitted email address is accessible via the variable $email on the index.php script. What you do with the contents of $email is up to you (write it to a text file, write it to a database, email it to yourself, etc). The text of the "popup" page itself can be edited in modalfiles/newsletter.html This is nice because it's not a real popup, so it can't be blocked in any way as far as I know. .
__________________
A whole lotta woman - a woman you can love all night long and never love the same spot twice... |
| Thread Tools | |
| Display Modes | |
|
|