Archive for the 'JavaScript Tips' Category

Content rotation

Monday, October 30th, 2006

There are many scripts which allow you to rotate banners, ad-blocks and canned paragraphs. This scripts provide you with lot of features such as statistics, split testing, cloaked links, etc. You may have a beautiful admin panel to control your campaigns…

But sometimes, all you need is rotate some content at your page. And you can implement it quick and simple without installation of a professional script.

Let’s suppose you have a main web-page where you’d like to rotate some content on.
You can create a number of files with the HTML-snippets to rotate them at your page: page1.html, page2.html, page3.html, page4.html

<a href=" &title=Content+rotation"> <img border="0" src="/wp-content/plugins/sociable/images/digg.png" width="80" height="70" /></a><br />
<a href=" &title=Content+rotation"> <img border="0" src="/wp-content/plugins/sociable/images/delicious.png" width="80" height="80" /></a><br />
<a href=" &title=Content+rotation"> <img border="0" src="/wp-content/plugins/sociable/images/reddit.png" width="90" height="90" /></a><br />
<a href=" &title=Content+rotation"> <img border="0" src="/wp-content/plugins/sociable/images/co.mments.gif" width="80" height="80" /></a><br />


Simple Photo Album / Slide Show Generator

Monday, August 21st, 2006

I need a script or html coding that will enable me or my users to have a slide show of images. …there is a single image on the home page, that I would like to rotate like a banner - I expect the script here would do that, but inside there are albums. I want visitors to be able to watch a slide show in any album.


OK. The main issue is to gather images from your server folder. Javascript can’t do this. So we have to use a PHP-script to scan your server folder and generate a slide-show Javascript.


Yet another Countdown Timer

Thursday, August 10th, 2006

You may have seen those timer based on a Flash animation. You have to be familiar with Flash Studio to create your own one.

My son created a simple JavaScript replica of this timer. His Online Countdown Timer became popular because of you can just insert a few lines of code into your html-page to get it working.


Simple OTO and Countdown Timer

Monday, August 7th, 2006

You may remember my Countdown script. Now we can combine it with the Simple OTO script to show a Countdown timer only once.

There are 2 variants of the Countdown script. You can use it with a popup window and at your regular page without a popup window.
Here is a recipe to add the Simple OTO script to both variants.


Simple One-Time-Offer script

Sunday, August 6th, 2006

The most of One-Time-Offer (OTO) scripts are based on cookies.
This isn’t a best method. But it is simple and it works in most cases.

The script I’d like to show you uses the same “cookie” method. But this script has a twist.
You may have several One-Time-Offers. And they would appear one by one every time they open your page again.


Exit page redirect

Monday, June 26th, 2006
I am wanting to create an automatic redirect exit page to another of my websites when my visitors leave my main website.

Well, when soneone leaves your web-page the onUnload event would be triggered. If you add a code to open a popup into the <body> tag, the popup would be shown every time they leave your page.

<body onUnload="'')">

This is a useless solution. The popup would be shown even they click a link to another page inside your site. We need to block the popup when they click a link or submit a form at your page.


How to hide the Return URL of your order form

Wednesday, June 21st, 2006

Have you ever looked into your Order-page HTML-code?
Did you see a code like this below?
<form action= "">
  <input type="hidden" name="cmd" value="_xclick">
  <input type="hidden" name="business" value="">
  <input type="hidden" name="item_name" value="Item name">
  <input type="hidden" name="item_number" value="1234">
  <input type="hidden" name="amount" value="19.95">
  <input type="hidden" name="no_shipping" value="1">
  <input type="hidden" name="return"
  <input type="hidden" name="cancel_return"

  <input type="submit" value="Buy Now">

What this hidden return and cancel_return fields mean?

This means people would arrive the URL you’ve entered in the return field after the payment completed.

I bet you wouldn’t like they look into your code and then open your return page without a payment. Even if this is not a download-page but just a thank-you page.

You can hide this field with a simple JS-script.


The automatically updated Copyright year

Saturday, June 17th, 2006

Do you have a lot of pages with the copyright notes?
Are you bored to edit all this pages when January 1st rolls around?

Use this simple and easy script to get rid of the New Year headache.

Personalization of a sales letter

Friday, June 2nd, 2006

Would you like to have your webpages and sales letters personalized?
I know you’d like.

It’s possible!
Basically someone arrives at a webpage they only enter their name then press a button to be taken to the next pages which would then be personalized with their name.

Take this great easy-to-use script to create personalized webpages.
When a web-form is completed all the other pages arrived at on that domain will be personalized.

User friendly popup’s

Monday, May 29th, 2006

So many people complain about popup windows despite how effective they are as a marketing technique, yet few people consider making them more user managely.

Today I’m giving you my final script, this one is designed specifically to help make your popup windows just that bit more easier to use for anyone visiting your site.

It’s such a simple device which is why I think so many people have over looked it’s effectiveness, so what is it?… simply a close window button or text link. A link like this makes each popup window you create that much easier to close down and much less likely to annoy.

Scroll down the page, grab yourself this code and place it all your popup windows from now on, your visitors will be glad you did.