PDA

View Full Version : Web Design problem... PLEASE HELP




mogzieee
Mar 13, 2008, 04:15 PM
If theres any web designer out there can they help me please!

I'm making an HTML webpage, but i can't get this rollover image/link to work... is there something wrong with the code below?? Or is it just my computer messing up??

<A
HREF="www.google.com"
onMouseOver = "rollover('home')";
onMouseOut = "rollout('home')";
><IMG SRC="home_out.gif";
NAME="home";
ALT="Home Page"; BORDER=0
HEIGHT=130 WIDTH=115
></A>
<SCRIPT TYPE="text/javascript">
<
setrollover("home_over.gif");
>
</SCRIPT>


Some other things to note (that may help you):
* my pictures "home_out" and "home_over" are in .gif format and saved on the Desktop
* my html site is also saved on the desktop for the time being....



ANY help would be GREATLY appreciated...! THANKS



angelwatt
Mar 13, 2008, 06:27 PM
Can you provide more of the JavaScript? You only provided one line and it doesn't have any meaning on its own.

zirkle2007
Mar 13, 2008, 07:23 PM
I think since he only provided one line, thats the problem. I don't think the Java is programmed into. I could be wrong, its been awhile since I've coded that particular thing, but I'm sure there is more to it.

zirkle2007
Mar 13, 2008, 07:25 PM
You'll need something like this.

http://www.htmlcodetutorial.com/images/images_famsupp_59.html

ChicoWeb
Mar 13, 2008, 08:04 PM
Seems like a lot of extra work that can be done with CSS and "sliding" backgrounds on hover state.

bozigle
Mar 14, 2008, 03:13 AM
<html>
<head>
<script language="JavaScript">
<!-- hide
function mouseOverPaint(){
document.namepix.src ="pixover.jpg"
}

function mouseOutPaint(){
document.namepix.src ="pixout.jpg"
}
//-->
</script>
</head>
<body>
<A HREF="#" onmouseOver="mouseOverPaint()" onmouseOut="mouseOutPaint()" >
<IMG name="namepix" src="pixout.jpg"/>
</A>
</body>
</html>



A good place to check and learn html/javascript is http://www.w3schools.com/js/default.asp

ChicoWeb
Mar 14, 2008, 09:20 AM
Or something like. Keep in mind you have to make an image that has the normal state on one side, and the rollover on the other, so the size below is half of the original image size.

Here is the image.

http://www.chicowebdesign.com/images/nav/home.gif



#home a, #home a:link, #home a:visited {
background: url(imgs/nav/home.gif) 0 0 no-repeat;
width: 100px;
}

#home a:hover {
background-position: -100px 0;
}

mogzieee
Mar 14, 2008, 08:00 PM
You'll need something like this.

http://www.htmlcodetutorial.com/images/images_famsupp_59.html

Thats actually awesome - and it's worked (:

Thanks for the help guys...