Top Text Bar for Your Pages

July 12th, 2008

People are using so many toolbars with their browsers… They read accustomed notifications showed by the toolbars. So more and more marketers begin using their ads look similar to the top bar notifications.


If you’d like to try this kind of text bar ( popup / “fly-in” ) with your ad / offer, this script will help you.

Step 1)
Download this top-bar.js script and upload it to your site beside your pages.

Step 2)
Insert this code below into your page between the <head> and </head> tags:

<script type="text/javascript" src="top-bar.js"></script>
<script type="text/javascript">
winOnLoad(topBar_Show);
</script>

Step 3)
Create your text ad covered in a <div> tag with id="topBar_Content" attribute. Place this DIV inside the ≶body> and </body> tags. Make sure your ad is not too long to be warped in two oe more lines:

<div id="topBar_Content">
<!-- Place your Text Ad here -->
See over for
<a href="http://myDomain.com" target="_blank">
limited special discount offer</a> for a new product!
</div>

 
That’s all. You’ll get a top text bar like this:


Your page with the complete code would look like below.

<html>
<HEAD>
. . .

<script type="text/javascript" src="top-bar.js"></script>
<script type="text/javascript">
winOnLoad(topBar_Show);
</script>
. . .
</HEAD>
<BODY>

<div id="topBar_Content">
<!-- Place your Text Ad here -->
See over for
<a href="http://myDomain.com" target="_blank">
limited special discount offer</a> for a new product!
</div>
. . .
</BODY>
</html>

The Top-Bar as a One Time Offer

The pure Top-Bar script displays your text bar every time your page is loaded. You can use the Simple OTO script to show the text bar only one time per visitor.
The integrated solution are shown below:

<html>
<HEAD>
. . .

<script type="text/javascript">
<!--// Simple OTO script
function oto(otoName) {
  var cookie = "oto"+escape(otoName)+"=";
  if (0 > document.cookie.indexOf(cookie)) {
    var d = new Date();
    d.setMonth(d.getMonth() + 120);
    document.cookie = cookie+"1; expires="
      +d.toGMTString()+"; path=/;";
    return true;
  } else return false;
}
//-->
</script>

<script type="text/javascript" src="top-bar.js"></script>
<script type="text/javascript">
if ( oto("MyOTO") ) winOnLoad(topBar_Show);
</script>
. . .
</HEAD>
<BODY>

<div id="topBar_Content">
<!-- Place your Text Ad here -->
See over for
<a href="http://myDomain.com" target="_blank">
limited special discount offer</a> for a new product!
</div>
. . .
</BODY>
</html>

How it works

This script covers your ad inside <div id="topBar_Content"> with additional DIV tags and add a block with the close link:

<div id="topBar_MainCover">
 <div class="topBar_Cover" id="topBar_CoverIE">

<div id="topBar_Content">
<!-- Place your Text Ad here -->
See over for
<a href="http://myDomain.com" target="_blank">
limited special discount offer</a> for a new product!
</div>

  <div id="topBar_CloseTab">
   <a href="javascript://"
   onclick="topBar_Show('none');return false;">close</a>
  </div>

 </div>
</div>

It also inserts CSS stylesheets to layout the Top-Bar:

<style type="text/css">
.topBar_Cover {
 position:absolute; top:0px; left:0px;
 width:100%; font: normal 13px sans-serif;
}
div > div.topBar_Cover { position:fixed; }
#topBar_Content {
 position:absolute; top:0;left:0; z-index:9;
 width:100%; padding:1px 2em 1px 2em;
 border-bottom: 1px solid silver;
 line-height:22px; background:lightyellow;
}
#topBar_CloseTab {
 position:absolute; top:0;right:0; z-index:10;
 padding:1px 1em 1px 2em;
 border-bottom: 1px solid silver;
 line-height:22px;
}
</style>
<!--[if gte IE 5.5]><![if lt IE 8]>
<style type="text/css">
div#topBar_CoverIE {
 width:expression(( (topBar_w =
  (document.documentElement.clientWidth?
   document.documentElement.clientWidth:
   document.body.clientWidth)
  )<200?200:topBar_w)+'px');
 position:absolute;
 top:expression((topBar_t =
  document.documentElement.scrollTop?
   document.documentElement.scrollTop:
   document.body.scrollTop)+'px');
 left:expression((topBar_l =
  document.documentElement.scrollLeft?
   document.documentElement.scrollLeft:
   document.body.scrollLeft)+'px');
}
</style><![endif]><![endif]-->

Finally it creates javascript functions to manipulate by the bar appearance:

<script type="text/javascript">
function topBar_Show(display) {
 var cover = document.getElementById("topBar_MainCover");
 if (cover)
  cover.style.display = ("none"==display?
   "none": "block");
 else setTimeout(
  "topBar_Show("+('none'==display? "'none'": "'block'")+")"
  , 100);
}
function winOnLoad(fn) {
 if (window.attachEvent)
  window.attachEvent("onload", fn);
 else
 if (window.addEventListener)
  window.addEventListener("load", fn, false);
}
</script>

 

by Michel Komarov, © Copyright 2008. iCoder.com

 

Share in social bookmarking:These icons link to social bookmarking sites where readers can share and discover new web pages.  digg del.icio.us BlinkList Reddit NewsVine YahooMyWeb co.mments

Related Articles:

Bogo-Pogo AntiSPAM game

May 5th, 2008

After a month I’ve been trying to contact one of my correspondent I get an autoreply saying: “Thank You for contacting me, but due to the increasing amount of spam I started to receive at this e-mail address, I decided to close it.”

Guess many people suffer of spam as they send all this excuses: “Hello, This email address is not monitored.”;
“Hello, You have contacted an email that is no longer checked.”;
“Due to a large amount of spam I no longer have time to wade through all of the email I receive to get to the legitimate messages. So if you have a need to contact me please do so at my helpdesk at…”.
 Others use various services like spamarrest.com so you need to fill in a form with CAPTCHA to prove you’re not a spam-bot.
Read the rest of this entry »

How Not to Send Your E-Mails Into a JUNK folder

April 7th, 2008
    THE MENU:

  • Egg and bacon
  • Egg, sausage and bacon
  • Egg and spam
  • Egg, bacon and spam
  • Egg, bacon, sausage and spam
  • Spam, egg, sausage and spam
  • Spam, egg, spam, spam, bacon and spam
  • Spam, spam, spam, egg, and spam
  • Spam, spam, spam, spam, spam, spam, baked beans, spam, spam, spam and spam
  • Lobster thermidor aux crevettes with a Mornay sauce garnished with truffle pate, brandy and with a fried egg on top and spam
  • Spam, sausage, spam, spam, spam, bacon, spam, tomato and spam

— Have you got anything without spam?
— Well, there’s spam egg sausage and spam, that’s not got MUCH spam in it.
I don’t like spam!

from Monty Python SPAM Skit

Do you like spam? We all hate spam!
This is why many of us, ISPs and email hosts use spam-filters to stop receiving unsolicit emails. This is so clever…

But now you’re going to send a newsletter to your subscribers / prospects list. Are you sure your newsletter arrive your recipients? It can be rejected by some of these spam-filters as well. This is the back of a coin.

And now what?
You can use the free SpamCheck service to test your newsletter before you send the email out. This tool analyzes your message is less likely to be considered spam by the filters.

Read the rest of this entry »

How to Make a 2-Steps Opt-In form

March 28th, 2008

If you like the KISS principle you may want to have short opt-in forms on your pages. But what if you need to capture more details then just name and email?… How to not scare prospects with a big form like this:

Name:
Email:
Street:
City:
State:
Zip:

Read the rest of this entry »

If Dr.House were an Internet marketer…

March 13th, 2008

You can think I’m wrong, but that’s no reason to quit thinking.
Dr. Gregory House

Each business takes unique talents and abilities. You need knowledge about something to make it! In order for you to find success, you will need to become an expert about something!

We’re missing something.
Dr. Gregory House

Find a group of people who are searching unsuccessfully for a solution to a problem — and are willing to pay for that solution. Offer them a product or service that successfully solves their problem.
 Note. Marketing does not focus on the product or service but focuses on the benefits of the product or service.

Everybody lies.
Dr. Gregory House

Often the ailment cannot be easily deduced because the patient has lied about symptoms and circumstances…
 Even the most experienced entrepreneurs fall into this trap from time to time and develop products without doing any research. Before you devote any serious amount of time and effort to developing your new ideas make sure there is a demand for the type of product, information, or service you want to launch. Don’t waste time and money on developing pretty but useless websites.

That’s absurd. I love it.
Dr. Gregory House

House tends to resist accepting cases that he does not find interesting.
Marketing has to be repetitive. You need to enjoy with your business.

Perseverance does not equal worthiness.
Next time you want to get my attention, wear something fun.
Low-riding jeans are hot.

Dr. Gregory House

For your marketing efforts to get results, you must establish a relationship with your prospects. The only way to do this is repetition, you may expect to contact a prospect several times before an actual sale is made. Build a strong personal relationship with your potential customers, so they feel comfortable buying from you.

Nobel invented dynamite. I won’t accept his blood money.
Dr. Gregory House

Countless people buy into the idea of making millions online overnight. Most people think about starting a business online in terms of getting a quick sale with no prior relationship with their potential clients at all. In reality, you’ll be more successful when you make your first goal to collect contact information from potential clients and follow up with them on regular basis.

I saw something amazing. Pure truth.
Dr. Gregory House

Marketing creates impact gradually not immediately. Expect low interest levels the first time you market your services, but don’t quit due to poor results. The results of your marketing efforts will reap their rewards over time, not overnight.

Have you guys heard any of my metaphors yet?
Well come on, sit on grandpa’s lap as I tell you how infections are criminals;
immune system’s the police. Seriously, Grumpy, get up here,
it’ll make us both happy.

Dr. Gregory House

Describe the solution in terms that makes them understand exactly how their lives will be improved if they buy your product.
 Make it easy to buy from your site. Test variations of the site. Use split testing to find out the best headlines, graphics, color, page copy. This is a secret weapon of internet marketing. You test to reduce your marketing risk and to increase your chances of success.

I take risks, sometimes patients die, but not taking risks causes
more patients to die - so I guess my biggest problem is
I’ve been cursed with the ability to do the math.

Dr. Gregory House

Any marketing activity has risk. Not all risk is bad and if risk is eliminated there is no opportunity for profit. Rather than eliminate risk you need to control or minimize those risks that are undesirable.

Linux migration. Part V. Windows Applications

March 6th, 2008

We have learned how to setup a Dual-Boot System with both Windows™ and Linux on your PC, what the Linux applications could be used in replacement of the Windows’ ones, and how to move emails from Outlook™ into KMail Linux-application. Now we need to know how to run native Windows applications on a Linux system.

I have some Windows-only programs I can’t live without.
The first of them is a special banking program I use to access my bank account. It works like a local proxy-server to encrypt the traffic between the bank and my PC.
At the second I need Internet Explorer to test the sites I’m working on.
We also can try Windows version of Adobe Photoshop® as a complicated Windows application.

You can use various virtual machines (VirtualBox or VMware Workstation) and emulators to run non-native applications on Linux.

Read the rest of this entry »

Linux migration. Part IV. Moving Emails

February 28th, 2008

You have created a Dual-Boot System on your PC and looked at what we get ‘from Box’ with Ubuntu Linux. Now we need to move our emails from Outlook™ or Outlook Express into KMail email Linux-application.

I had been struggling with readPST utility. I was hope for smooth converting my 3Gb Outlook PST file into KMail-compatible mbox structure. But it failed…
 The latest version of readPST/libPST utility can convert PST files of Outlook 97-2002, but it can’t work with Outlook 2003 PST.
 After I saved emails in an old (2002) version PST and converted the file, the KMail didn’t can import them correct. All messages in every folder were agglutinate in a long single message.
 So, don’t waste time with readPST.

Read the rest of this entry »

Linux migration. Part III. What you get ‘From Box’

February 8th, 2008

In the previous post I show how to create a Dual-Boot System on your PC. Lets now reboot computer with our fresh Linux and see what we get ‘from Box’.

Kubuntu desktop looks similar to Windows™. You’ll find the Start button in the form of “K” and the System menu with installed applications.

Read the rest of this entry »

Linux migration. Part II. Dual-Boot System

January 30th, 2008

As I have wrote I decide to try Linux. I ordered and received Kubuntu CDs.
Now I need to create a Dual-Boot system on my computer to test applications I need with Linux and to be able to roll back on my current system if Linux fails me.

Read the rest of this entry »

Linux migration. Part I. WHY

January 21st, 2008

I’ve been using Windows™ for fifteen years. And now I decide to try Linux.
What the benefit do I expect from Linux? Let me explain.

Read the rest of this entry »