Author Topic: Button code request  (Read 3228 times)

0 Members and 1 Guest are viewing this topic.

Offline Jedigaz

  • Newbie
  • *
  • Posts: 12
    • View Profile
Button code request
« on: June 17, 2006, 06:39:46 PM »
Right,

I have this code for my button thus far:

<p align="center"><img src="/my path/buttonover.jpg" width="150" height="30" border="0"></p>  result of this here ........ www.gazfx.com

I have 3 images of button...off, over and down....i have finally managed with the help of a friend to get that bit right..(had a broken image before)....

My question is this:

What code do i need to put in to get these mouseover effects to be working correctly with links...and if the code is to be say 10 lines long will i have to repeat this code for every button i need or is there a simpler way...

any help as always greatly appreciated :D

Still learning but getting there slowly but surely :wink:




Offline Jedigaz

  • Newbie
  • *
  • Posts: 12
    • View Profile
Re: Button code request
« Reply #1 on: June 18, 2006, 05:37:53 AM »
right...change of plan somewhat..

i have put this into my head of home.html

image1 = new Image();
image1.src = "/templates/Wallpaper/images/buttonover.jpg";

image2 = new Image();
image2.src = "/templates/Wallpaper/images/buttonover.jpg";

image3 = new Image();
image3.src = "/templates/Wallpaper/images/buttonover.jpg";

image4 = new Image();
image4.src = "/templates/Wallpaper/images/buttonover.jpg";

image5 = new Image();
image5.src = "/templates/Wallpaper/images/buttonover.jpg";



and this into body of home html:

<a href="http://www.blah.com/" onmouseover="image1.src='/templates/Wallpaper/images/buttonover.jpg';"
onmouseout="image1.src='/templates/Wallpaper/images/buttonoff.jpg';">
<img name="image1" src="/templates/Wallpaper/images/buttonoff.jpg" border=0></a>

<a href="http://www.blah.com/" onmouseover="image2.src='/templates/Wallpaper/images/buttonover.jpg';"
onmouseout="image2.src='/templates/Wallpaper/images/buttonoff.jpg';">
<img name="image2" src="/templates/Wallpaper/images/buttonoff.jpg" border=0></a>

<a href="http://www.blah.com/" onmouseover="image3.src='/templates/Wallpaper/images/buttonover.jpg';"
onmouseout="image3.src='/templates/Wallpaper/images/buttonoff.jpg';">
<img name="image3" src="/templates/Wallpaper/images/buttonoff.jpg" border=0></a>

<a href="http://www.blah.com/forum/" onmouseover="image4.src='/templates/Wallpaper/images/buttonover.jpg';"
onmouseout="image4.src='/templates/Wallpaper/images/buttonoff.jpg';">
<img name="image4" src="/templates/Wallpaper/images/buttonoff.jpg" border=0></a>

<a href="http://www.blah.com" onmouseover="image5.src='/templates/Wallpaper/images/buttonover.jpg';"
onmouseout="image5.src='/templates/Wallpaper/images/buttonoff.jpg';">
<img name="image5" src="/templates/Wallpaper/images/buttonoff.jpg" border=0></a>


everything is working ok..good for me anyway..

my question is this...TEXT..how do i get my text on these buttons..i have tries loads of different ways with no success wotsoever...

www.gazfx.com if u wanna see !!!

thnx in advance....yikes look at the time...this is taking over my life... :roll: