PDA

View Full Version : Floating Banners/Ads


EZ-Goin_NYC
3-17-07, 09:23 AM
Hello Everyone,

I have a message that I want to convey to visitors on my site, yet I only want it to show on a single page which contains information to which it refers. (Not display on every page).

The page is already nicely designed and there isn't really room for a regular banner. So I'd like to create a "floating banner" (like the transparent ones I've seen on several sites; AOL has many of these.) One which floats from left to right on the webpage and either automatically disappears after a few seconds and/or provides an "X" for the user to click, and clear it away.

I've searched and searched and not found any software, script or coding anywhere which will help me create this. Anyone have a suggestion?

kurniawan
3-17-07, 11:05 AM
You can make it this way :

<div style="position:absolute;left:0;top:0;width:100%" id="banner">
<img src="banner.gif">
</div>

Control the behaviour using $_SESSION variable with PHP. And if you want erase it after a few seconds, use javascript which will be activated after x seconds everytime your page is loaded (with "OnLoad" event).

Kitchensink108
3-17-07, 01:52 PM
<div style="position:absolute; top:40%; left:40%; height:250px; width:250px;" id="floatingad">this is an advertisement. [<span onmouseup="document.getElementById('floatingad').style.displa y='none'">close</span>]</div><div style="position:absolute; top:40%; left:40%; height:250px; width:250px;" id="floatingad">this is an advertisement.</div>
<script type="text/javascript">
setTimeout("disappear", 3000);
function disappear() {
document.getElementById("floatingad").style.display="none";
</script>Those should both work. Mess around with the style attribute to put it where you want.

YvetteKuhns
3-19-07, 12:54 PM
One which floats from left to right on the webpage and either automatically disappears after a few seconds and/or provides an "X" for the user to click, and clear it away.

I hate those things! :eek: I never read them and click them away like shooting at a moving target.

Kitchensink108
3-19-07, 08:44 PM
I hate those things! :eek: I never read them and click them away like shooting at a moving target.I could also write the code to make it jump to a random part of the screen every second. It'll be like a game. If you win you get to actually use the website :p

YvetteKuhns
3-20-07, 06:15 PM
A few years ago, someone who worked with my husband had knee surgery and was stuck at home. He was foolish enough to give his email address to us. We sent dirty Flash games and things to him for his amusement. One day we sent him the infamous Javascript that showed an image with a pair of boobs. He wanted to click the X to close the image, but when he pointed the mouse to the image, there were TWO images. After the screen was covered in boobs, he began to panic and turned off his computer. Upon his return to work, he warned everyone not to give their email addresses to Dirty Don (my husband). :D

Kitchensink108
3-21-07, 06:58 PM
rofl :D
Reminds me of the "you are an idiot" flash that basically made you restart your computer. Well, actually I don't know how bad it was since I know a lot more about computers since the last time I was hit with it, and I don't feel like finding out if I can beat it now.

Though that also reminds me of the Javascript I wrote that fork-bombed anyone without a pop-up blocker. Fun stuff.

YvetteKuhns
3-21-07, 07:13 PM
How about the Javascript that looked like it was deleting important files from the computer? That one was too scary for him, but I did that to one of my less computer savvy clients. She freaked and asked me to fix her computer. Then I told her that was a prank to teach her a lesson about opening any stupid attachment to her emails. :D

Kitchensink108
3-21-07, 07:17 PM
Hehe. Actually, a few years ago, I got a pop-up once that mimicked the look of a really big virus going around at the time. I started freaking out, then saw that there was an advertisement on the screen and they were just trying to get my attention in a really mean way.

On a slightly related note,
http://www.w3schools.com/images/downloadwww.gif

YvetteKuhns
3-21-07, 07:30 PM
On a slightly related note,
http://www.w3schools.com/images/downloadwww.gif

Hehe. Drive A?! :D

entrecon
3-21-07, 10:36 PM
Nice way to drum up business! Circulate a fake virus to all of your customers and then charge them to "fix" it!

YvetteKuhns
3-22-07, 01:23 PM
Nice way to drum up business! Circulate a fake virus to all of your customers and then charge them to "fix" it!

I wouldn't do that, but I believe some people already drum up business by selling an OS that needs fixing. ;)

(jj)
3-22-07, 09:50 PM
The most fun that I used to have was back in the days of DOS. I wrote a batch file that would display a sexy lady image when the computer booted with a message stating "Press any key to continue". Once they continued it would delete the image and batch file from the computer.

I would place the files on a computer that I'd repaired (the ones that I knew it would not offend). The fun was having them phone asking how to find that image again :D

As for the original topic of this thread: You do not want to name a banner image "banner", because visitors that use Internet security programs such as Norton will have anything named banner blocked.

YvetteKuhns
3-23-07, 11:30 AM
You do not want to name a banner image "banner", because visitors that use Internet security programs such as Norton will have anything named banner blocked.

I am not sure if that is true. What if the word "banner" appears in the name? I have used CompanyNameLogo.gif or maybe NameBanner.gif in the past. I use Norton and the banners were not blocked. Hmm...

Kitchensink108
3-23-07, 02:02 PM
Here are some of the default patterns adblock plus for Firefox blocks:
/banners/*.gif$~background
/banners/*clickTAG
banner*&rand
banner?
bannerad

YvetteKuhns
3-23-07, 02:14 PM
I use Firefox and haven't noticed any blocked, so I never looked at the image names. Blocking specific (generic) names is pointless, since the image names can be changed.

(jj)
3-23-07, 05:45 PM
Yes Yvette it is true. Many of the software firewalls such as Norton Internet and Ad Block addons will block files named "banner" (plus many others).

A friend contacted me once because the photo of one of her dogs would not display. The dogs name (and photo name) happened to be Banner and she was running NIS on her computer.