Advertisement
xpeed

create a pop up exit with blogspot

Dec 10th, 2015
134
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. In your dashboard click the 'layout' tab, and then 'edit html'. In between your <head> and </head> tags you need to add this code:
  2.  
  3. <script language='javascript'>
  4. var exitpop = true;
  5. function popup(){
  6.    
  7. if(exitpop==true) { window.open('http://www.google.com') }
  8. }
  9. </script>
  10.  
  11.  
  12. And then you need to change your <body> tag to this:
  13. <body onunload='popup()'>
  14. 'Save Template' and that's it
  15.  
  16. Whoops almost forgot to add:
  17. Now if you don't want the popup to be triggered when a user clicks a particular link (ie and internal link on your blog), you need to select the 'Expand Widget Templates' checkbox, and manually edit each link to add 'onclick="exitpop=false"':
  18.  
  19. <a onclick='exitpop=false' ...
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement