How To Create A Popup Window For Blogger

How To Create A Popup Window For Blogger


In this post, I will show you how to create a popup window for blogger? You will see two types of the popup window. One will open automatically and another one will open on click. But before that, you should know, Blogger is a free blogging platform provided by Google. You can use blogger to make a personal and a professional blog without any cost. Thousands of professional bloggers use Google blogger to make their blogs.
For the beginner, I have published many tutorials on blogger. But the professional bloggers, they are usually more advance. If you are also a professional blogger, then you may want to know how you could make your blog or your client’s blog more dynamic.
In that case, you may need to edit some codes too. Today I am going to discuss how to create a popup window for blogger?
You may notice, many blogs or website use popups for many purposes. Sometimes popup windows are required by clients to promote anything or placing many kinds of ads. You may use this type of popup window anywhere of your blogs or websites. Here I am going to show a step by step way to add a popup window in blogger.

Create A Popup Window For Blogger (Open on Click)

1. First of all, you will have to log in to your blogger account.
2. Go to your blogger dashboard in which blog you need to place a popup window. From the left side of your blogger dashboard select “Layout” section.
create-popup-window-blogger-1
3. Now select “Add A Gadget” on your blog’s sidebar or footer based on your need.
create-popup-window-blogger-2
4. After clicking on adding a gadget link, you will see many gadgets. From the list, you must select the “HTML/JavaScript.”
html-javascript-blogger-widget
5. Now grab the code below and place this in your HTML/JavaScript section.
<script type="text/javascript">document.body.onclick= function(){ window.open('http://blogornate.blogspot.com', 'poppage', 'toolbars=0, scrollbars=1, location=0, statusbars=0, menubars=0, resizable=1, width=950, height=650, left = 300, top = 50'); }</script>
Important :
  • In the above code, you must change the URL: http://blogornate.blogspot.com
  • You may also customize your popup window, and it’s height and width by replacing the values as the way you need.
This popup window will open if one of your users or readers clicks on anywhere on your blog. This popup window will open the page pointing in the above code.

Create A Popup Window For Blogger (Opens Automatically)

Do same till step 4 and then grab the code and place it in your HTML/JavaScript section:
<script type="text/javascript"> window.open('http://blogornate.blogspot.com','toolbars=0, scrollbars=1, location=0, statusbars=0, menubars=0, resizable=1,width=350, height=150, left = 100, top = 50'); </script>
In this code, you must replace the URL: http://blogornate.blogspot.com with the URL you want to open in your popup.
You may also customize your newly created popup window by adjusting its height and width.

Post a Comment

أحدث أقدم