PDA

View Full Version : javascript for banners?


rickjansen104
10-02-2000, 06:08 AM
hi

[sorry for my bad enlish, but i'm from holland]
i have an welcome page for my website with a banner and a link to my "real" site...
is there an Javascript (or other script) which can make it so the visitors MUST click first on that banner and than click on that banner otherwise they can't come on my site?
thnx

rickjansen104

brobe
10-02-2000, 10:21 AM
Hi,

Welcome to HTMLforums.com!

The easiest way i could see to do this is when the user clicks the banner on the front page, then have a window popup with the banner's destination in it, and then the regular browser where they clicked the banner would go to your site.

However, i will warn you that a lot of affiliate programs and advertising agencies do not like Incentive based results. I have no control over what you will do with the following code and your use of the following code is your responsibility and not that of HTMLforums (Big Resources Network) or that of myself.


Here is the code:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>Your home page title</title>
</head>
<body>

<script language="JavaScript">
function callad() {
window.open('test.html');
location.href="test2.html";
}
</script>
<a href="javascript:callad()">CLICK BANNER HERE</a>
</body>
</html>

test.html = the banner destination or affiliate url

test2.html = your homepage or site

Click Banner Here = text for user to click or it can be an image (banner).

Your files can be named anything but replace the code accordingly above.

Hope this helps...


------------------
Brett Roberts
Programmer / Analyst
http://www.mp3-search-portal.com
ICQ: 85408692

rickjansen104
10-02-2000, 12:54 PM
hmm
that's not exactly where i'm looking for but thnx anyway...

brobe
10-02-2000, 01:43 PM
Hi,

I understand what you are looking for but how do you expect for someone to click and advertisement banner...go view their site and then return later? You could set cookies when the user clicks the banner but unless you keep them in a frame then you will have to rely on them ever coming back to your site to determine if they have clicked your banner.

If i go to your site...click your banner then i may not ever come back to your site...what is the point in that...just have a banner there and no site? That would achieve the results you are looking for.

Maybe i just don't see the structure on the part of the user. Unless you are not aiming to please the user...only your pockets?

If that is what you want i don't know that it would be possible unless you do it the way i explained above.

Sorry to not be of help...

------------------
Brett Roberts
Programmer / Analyst
http://www.mp3-search-portal.com
ICQ: 85408692

HTMLforums Guide