homepage Welcome to WebmasterWorld Guest from 54.227.5.234
register, free tools, login, search, subscribe, help, library, announcements, recent posts, open posts,
Accredited PayPal World Seller

Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
Forum Library, Charter, Moderator: open

JavaScript and AJAX Forum

    
How to create a "Are you sure you want to leave this page?" drop down
How to create a drop down to see if you can hold a user just a bit longer
iFixSolutions




msg:3996461
 2:52 am on Sep 27, 2009 (gmt 0)

I'm sure this is simple, and I've seen these a million times, but for the first time I have a need to create one of those drop downs that interrupts a person from leaving a page with the simple question: are you sure?

I'm building a squeeze page for a seminar i'm putting together. I figured I would monetize it by presenting them a "special offer" if they decide to leave without signing up to attend.

I honestly have no idea how they're created, i'm assuming it's in java script but all my searches on this site as well as on the web have come up empty. this is what i want to do:

1. user decides to leave my page without registering for an event.
2. a drop down is activate saying "before you leave I'd like to present you with a special offer. click ok and you will be taken to the offer where if you'd like to take a look click ok, if not click cancel"
3. they click ok to continue
4. they're directed to an ebook pdf purchase page that then immediately has a drop down that then gives them the ability to stay and look at the page or click cancel to be returned to wherever they came from.

5. help. i don't have a clue what goes into creating one of these.

sorry if this is posted in the wrong section

 

maximillianos




msg:3996527
 11:53 am on Sep 27, 2009 (gmt 0)

I would recommend not using such a tactic. From my perspective it is a big turn off.

But alas I am just one. Others may not share my opinion.

The solution would be to use the unload event of the body tag on your page.

rocknbil




msg:3996617
 5:01 pm on Sep 27, 2009 (gmt 0)

It's not just you . . . Exit polls/alerts/pages are despised by most, and promoted by marketers everywhere, it's an argument that will never go away. They must work to some degree or they wouldn't persist.

Yes you'll have to use Javascript or VBscript to initiate a new window on unload of the parent page as described, one would only have to have a moderate skill in Javascript to pull it off.

iFixSolutions




msg:3996677
 7:57 pm on Sep 27, 2009 (gmt 0)

yes, i think it's a give and take. i'm torn because i don't really like them either, but if they're "tastefully" done i can see how they'd be effective.

one would think the javascript should be readily available out there somewhere, right? I'd think there would be a resource where i could find out how to do it?

phranque




msg:3996804
 1:56 am on Sep 28, 2009 (gmt 0)

it's in the source code of every page that exhibits this behavior.

lexipixel




msg:3997189
 6:18 pm on Sep 28, 2009 (gmt 0)

I used to go out of my way to cause one of these to appear --- it was in the checkout for a hosting company... if you loaded the "Sign Up Now" page, then attempted to navigate away from it you'd get a dialog offering you a huge discount... the only way to activate the discount code was by clicking the "Return to sign up page now" link.

iFixSolutions




msg:3997221
 7:32 pm on Sep 28, 2009 (gmt 0)

so is there some code out there floating around that you can point me to? Something i can throw into place and then modify to my needs?

Leosghost




msg:3997311
 9:32 pm on Sep 28, 2009 (gmt 0)

just go surfing for warez or prohibitedpron ,their affs were always the main users of such ..also you may come across chromeless popups that take browser focus ..instant "you need this codec" messages etc ..

just so as you know what company you are seeking to keep ..:)

and why no-one here is ( hopefully ) going to point you at a "copy / paste" script ( BTW almost all scripts of this sort trigger either alerts in browsers or get auto blocked by modern browsers ) ..what is more acceptable ( but irritating nonetheless ) are dhtml "slide ins" that you as a surfer can dismiss ..

there are many commercial apps than can make them seamlessly for you if you cant code your own ..

and as I'm aware of at least one member here who sells such apps ..dont ask me for the "how to" :)

iFixSolutions




msg:3997318
 9:40 pm on Sep 28, 2009 (gmt 0)

haha.. ok! fair enough. I'm using aweber for my opt-in list on the registration page. i could use a second exit form, too, maybe?

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About
© Webmaster World 1996-2014 all rights reserved