Tuesday 1 May 2012

How to Create Easy Alert Pop-Up Box in Blogger

How to Create Easy Alert Pop-Up Box in Blogger

So now as you can see I have just given a small message "Hello Friends ! Don't Forget To Like Us On Facebook" so you can replace this message with yours and when ever a person opens any post or homepage this message will popup. Follow below steps to add the code to your personal blog and show this message to all your visitors.

1. Go to Blogger.come and Sign In to your Account.

2. Now choose your blog and Navigate to Template > Edit HTML.

3. Now you can place the below code anywhere but if you wanna render this alert box faster than paste it right above the </head> tag or if you want it to load after the blog has been loaded than you can place the below code after the </body> tag.


<script type='text/javascript'>
alert(&quot;
Hello Friends ! Don't Forget To Like Us On Facebook &quot;);
</script>


4. Now just change the red line with your line and your pop-up box is ready to be popped-up.
How to Show this Pop-Up Box only on the Homepage :

If you just want to render this alert box on the Homepage of your Blog you can use the below code follow the same procedure above.

<b:if cond='data:blog.url == data:blog.homepageUrl'>
<script type='text/javascript'>
alert(&quot; Hello Friends ! Don't Forget To Like Us On Facebook
 &quot;);
</script>
</b:if>


So now just refresh your blog and enjoy this new popup box, share news, important information or a hearty greeting. Do share this post with all your friends if you liked it.

0 comments:

Post a Comment

 

SCROLL TO TOP