Sunday, 23 September 2012

How to add Alert message box to your blogger

This tip is helpful for bloggers,You can display new message box to your site when visitor came your site.Using this, we can give special announcement.Most important is If visitor click "OK" he can visit the site.If not, we can redirect him to some other site.This gadget will helpful some time.(not mean every time).Thats why i share with you.you can try it.
1.  Log in to your blogger account and Go to Design >> Page Element
2. Click Add Gadget and select 'HTML/Javascript'
3. Paste below one of below code.
<script  type="text/javascript">
    confirm('Are you sure you want to  continue?');
    if  (confirm('Are you sure you want  to continue?')) {
     window.location =  "http://www.bloggertrix.com/";
    }
    else  {
     window.location =  "http://www.google.com/";
    }
    </script>
* Replace with Blue color text as your like.
* Replace Red color URL with,what you want to redirect site if User clicked OK
* Replace Green color URL with, what you want to redirect site If User clicked cancel
4. Save HTML/Javascript. you are done.

No comments: