Best Blackhat Forum

Full Version: how can i create a exit popup like this in WORDPRESS?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I see many sites using this pop up, and how can i create it in Wordpress?
Thank you so much.

http://upanh.biz/images/2014/05/30/exit_popup.png

Plz anyone help me :(
google exit popup plugins or try this one: https://wordpress.org/plugins/m-wp-popup/ - i haven't tried it yet but will later. also, there is another one i used to use when i have time later i will look for it for you.
(05-31-2014 03:18 AM)supergirl Wrote: [ -> ]google exit popup plugins or try this one: https://wordpress.org/plugins/m-wp-popup/ - i haven't tried it yet but will later. also, there is another one i used to use when i have time later i will look for it for you.
Thank you supergirl,
I think it's just a javascript added to somewhere in WP function.
1- create js file and put it to js folder and add this code to it
myjsfile.js

PHP Code:
window.onbeforeunload = function(){  return 'Are you sure you want to leave?';}; 


2- add this codes to functions.php
PHP Code:
function my_scripts_method() {    wp_enqueue_script(        'custom-script',        get_stylesheet_directory_uri() . '/js/myjsfile.js',        array( 'jquery' )    );} 
(05-31-2014 04:09 AM)8888post Wrote: [ -> ]1- create js file and put it to js folder and add this code to it
myjsfile.js

PHP Code:
window.onbeforeunload = function(){  return 'Are you sure you want to leave?';}; 


2- add this codes to functions.php
PHP Code:
function my_scripts_method() {    wp_enqueue_script(        'custom-script',        get_stylesheet_directory_uri() . '/js/myjsfile.js',        array( 'jquery' )    );} 
Thank you so much, but how can i redirect someone to another when he wants to stay, maybe a bonus page or optin page?
(05-31-2014 01:08 PM)leo1in88 Wrote: [ -> ]
(05-31-2014 04:09 AM)8888post Wrote: [ -> ]1- create js file and put it to js folder and add this code to it
myjsfile.js

PHP Code:
window.onbeforeunload = function(){  return 'Are you sure you want to leave?';}; 


2- add this codes to functions.php
PHP Code:
function my_scripts_method() {    wp_enqueue_script(        'custom-script',        get_stylesheet_directory_uri() . '/js/myjsfile.js',        array( 'jquery' )    );} 
Thank you so much, but how can i redirect someone to another when he wants to stay, maybe a bonus page or optin page?


above code useful for one page themes.
but if you need warn user on exit site or click external link (not internal links) use this codes
myjsfile.js
PHP Code:
window.onbeforeunload = function(){    return "Are you sure you want to leave our website?";}$(function(){    $('a').click(function(){        if (this.href.match(location.host)) {            //alert('Please continue on to our site.');            window.onbeforeunload = null;        } else {            //alert('You are about to leave our website.');        }    }); }); 
functions.php
PHP Code:
if (!is_admin()) add_action("wp_enqueue_scripts""my_jquery_enqueue"11);function my_jquery_enqueue() {   wp_deregister_script('jquery');   wp_register_script('jquery'"http" . ($_SERVER['SERVER_PORT'] == 443 "s" "") . "://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"falsenull);   wp_enqueue_script('jquery');   wp_enqueue_script(        'custom-script',        get_stylesheet_directory_uri() . '/js/myjsfile.js',        array( 'jquery' )    );} 

(05-31-2014 06:04 PM)sharesolutions Wrote: [ -> ]Hi Dear, you can check this one https://wordpress.org/plugins/pinoy-pop-...reenshots/
Thank you, but seem this plugin has Last Updated: 2011-9-13, does it still work?
(05-31-2014 05:45 PM)8888post Wrote: [ -> ]
(05-31-2014 01:08 PM)leo1in88 Wrote: [ -> ]
(05-31-2014 04:09 AM)8888post Wrote: [ -> ]1- create js file and put it to js folder and add this code to it
myjsfile.js

PHP Code:
window.onbeforeunload = function(){  return 'Are you sure you want to leave?';}; 


2- add this codes to functions.php
PHP Code:
function my_scripts_method() {    wp_enqueue_script(        'custom-script',        get_stylesheet_directory_uri() . '/js/myjsfile.js',        array( 'jquery' )    );} 
Thank you so much, but how can i redirect someone to another when he wants to stay, maybe a bonus page or optin page?


above code useful for one page themes.
but if you need warn user on exit site or click external link (not internal links) use this codes
myjsfile.js
PHP Code:
window.onbeforeunload = function(){    return "Are you sure you want to leave our website?";}$(function(){    $('a').click(function(){        if (this.href.match(location.host)) {            //alert('Please continue on to our site.');            window.onbeforeunload = null;        } else {            //alert('You are about to leave our website.');        }    }); }); 
functions.php
PHP Code:
if (!is_admin()) add_action("wp_enqueue_scripts""my_jquery_enqueue"11);function my_jquery_enqueue() {   wp_deregister_script('jquery');   wp_register_script('jquery'"http" . ($_SERVER['SERVER_PORT'] == 443 "s" "") . "://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"falsenull);   wp_enqueue_script('jquery');   wp_enqueue_script(        'custom-script',        get_stylesheet_directory_uri() . '/js/myjsfile.js',        array( 'jquery' )    );} 

Thank , but where i insert the next page, once the customer stay on the page?
(06-01-2014 01:08 AM)leo1in88 Wrote: [ -> ]Thank , but where i insert the next page, once the customer stay on the page?
create all page in dashboard and for next botton that liked to next page.
Reference URL's