Go Back   Web Hosting UK Forums | Linux Windows Dedicated Server and cPanel VPS Hosting Forum > Web Hosting and Domains > Web Hosting Forum

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 11-13-2007, 09:50 AM
Senior Member
 
Join Date: Jan 2007
Posts: 948
Default banner with javascript

Hi all,

I don't know if anyone remembers or even knows of the 'make poverty history' band you could place on your website? You could place it left or right at the top of your page by adding a little javascript to your page.

Now i would like to make similar which is: create an image, then offer the code to websites who would like to help with our petition.

Anyone know what i mean? or know how to do this?
My experience with javascript is very limited.

I guess i need to know how to position an image using javascript. I presume it uses the layer option?

thx
jon
__________________
West Dorset Community

Last edited by jon123; 11-13-2007 at 10:16 AM.
Reply With Quote
  #2 (permalink)  
Old 11-13-2007, 10:13 AM
kev woodman's Avatar
Premium Member
 
Join Date: Jul 2006
Location: Newport, Wales, UK.
Posts: 1,494
Default

Why do you need the javascript Jon, why not just an image banner?
__________________
homo sum: humani nil a me alienum puto ... ( just Google it )
Reply With Quote
  #3 (permalink)  
Old 11-13-2007, 10:21 AM
Senior Member
 
Join Date: Jan 2007
Posts: 948
Default

Hi Kev, thx for reply.

Well i need something painless that other webmasters can use.
If they have to make way for the image on their site then i don't think they will do it.
The 'make poverty history' image i guess used the layer option so that it would appear on top of anything existing on the page to start with.

Am I explaining it correctly?

The image is relating to this site or rather this petition : http://www.wedbag.org.uk/main/petition/sign.php

There are 5 sites i know of who would carry this banner/image/band, so i need a bit of code that will do that painlessly. AND make it very promionent on the page....top left, diagonally
__________________
West Dorset Community
Reply With Quote
  #4 (permalink)  
Old 11-13-2007, 10:32 AM
Senior Member
 
Join Date: Jan 2007
Posts: 948
Default

So I would have something similar to this image


Sitting on the top left of the webpage as a layer???? so that it is effectively sits on top of anything else there. And the javascript would do this?
__________________
West Dorset Community
Reply With Quote
  #5 (permalink)  
Old 11-13-2007, 10:37 AM
kev woodman's Avatar
Premium Member
 
Join Date: Jul 2006
Location: Newport, Wales, UK.
Posts: 1,494
Default

You could use a floating javascript iFrame (and a page hosted on your own server for the content). I found this lump of code which looks the business but you might want to trim a lot of the fat from it because it does consist of a fair few lines of code.

Even better you could put almost all of that code on your own site in a .js file and then just call it from the host pages. This would cut down on the amount of code they had to insert. I haven't looked at it closely but I suspect you may be able to abstract all of it so all they had to include was the text/javascript src-"http://www.yoursite.co.uk/floatingbanner.js code.

I'm no expert on js but I don't see any obvious reason why this wouldn't work.
__________________
homo sum: humani nil a me alienum puto ... ( just Google it )
Reply With Quote
  #6 (permalink)  
Old 11-13-2007, 10:45 AM
Senior Member
 
Join Date: Jan 2007
Posts: 948
Default

That is great Kev, I will have a look at that link now.
I did spend a couple of hours searching google last night, but as you know, you can't find anything unless you know what you are looking for!

Much appreciated, will get back to you if that is ok

Thanks again
__________________
West Dorset Community
Reply With Quote
  #7 (permalink)  
Old 11-13-2007, 10:58 AM
kev woodman's Avatar
Premium Member
 
Join Date: Jul 2006
Location: Newport, Wales, UK.
Posts: 1,494
Default

its always the same isn't it - you have to know the right jargon to find what you're looking for but you have to find what you're looking for to learn the jargon
__________________
homo sum: humani nil a me alienum puto ... ( just Google it )
Reply With Quote
  #8 (permalink)  
Old 11-13-2007, 01:40 PM
Senior Member
 
Join Date: Jan 2007
Posts: 948
Default

yes it is Kev, certainly in my case.

Anyway, i messed around with that code from the link you supplied, but I just don't know enough about javascript to edit it. The scrolling down the page was something i didn't want but couldn't find out how to remove it.

Anyway, thanks to your iframe info, i was able to find the old poverty band and use theres with a few modifications. It was ok to use the function as long as i left the copyright intact. It was also based around css which is just what i wanted.

I have done a test here.
The image wants changing and text also, but it works a treat. Of cource that page above is a fixed width, but works fine overlaying a liquid design also. I don't fancy creating loads of different ones for different designs. The option of one left or one right will do I think

Many thanks again

Jon
__________________
West Dorset Community

Last edited by jon123; 11-13-2007 at 01:43 PM.
Reply With Quote
  #9 (permalink)  
Old 11-16-2007, 02:32 PM
Junior Member
 
Join Date: Jun 2007
Posts: 24
Default

Good test IMO.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 03:18 AM.
Copyright 2002-2007 WebHosting.uk.com. All rights reserved.
Web Hosting UK Forum