Closed Thread Icon

Preserved Topic: Darn it, I'm a Photographer not a mouseover mechanic! Pages that link to <a href="https://ozoneasylum.com/backlink?for=17871" title="Pages that link to Preserved Topic: Darn it, I&amp;#039;m a Photographer not a mouseover mechanic!" rel="nofollow" >Preserved Topic: Darn it, I&#039;m a Photographer not a mouseover mechanic!\

 
Author Thread
dan sinclair
Neurotic (0) Inmate
Newly admitted

From: portland, maine usa
Insane since: Sep 2000

posted posted 09-26-2000 18:30

Hi Folks,

This is my first post, OK, maybe second. I thought I had sent this post a few days ago but as far as I can tell I wasn't sucessful in posting the original message. So, here's the original message, sorry if this is a duplicate.

I wonder if any of you kind souls might be willing to give me a hand with a mouseover problem I'm having?
I've never done a mouseover before and I'm trying to help a friend with a web page.

If anyone is interested check out: http://www.nlbbs.com/~sinclair/bcn-test.html (the only thing there is my feeble attempt
at mouseovers. Yup, I know, pathetic... You folks don't have to worry about me
stealing your clients <img border=0 align=absmiddle src="http://www.ozones.com/forum/smile.gif">

The only mouseover that works is the "Home" button. Then if you click one button a different one lights up and
there are a bunch of buttons that don't do anything but sit there and look stupid.


Here's my code:

<html>

<head>
<title>BCN Lawn Care</title>
<meta name="description" content="">
<meta name="keywords" content="">

<SCRIPT LANGUAGE="JavaScript">
<!--Docozone's Javascript code, copyright 1998
// Feel free to borrow and modify this code,
// but be sure leave this credit in the source!
// Your pal, -Dr. Thaddeus Ozone-
// http://www.visi.com/~drozone/

browserName = navigator.appName.substring(0,8);
browserVer = parseFloat(navigator.appVersion);
version = "bad"
if (browserName == "Netscape" && browserVer >= 3) version = "good"
if (browserName == "Microsof" && browserVer >= 4) version = "good"

if (version == "good") {
names = new Array("home","lawn","land","miss","owner","ref");
buttons = new Array(12);
for (m=0; m<=11; m++) {
buttons[m] = new Image(); }
buttons[0].src = "img1_on.jpg";
buttons[1].src = "img1_off.jpg";
buttons[2].src = "img3_on.jpg";
buttons[3].src = "img3_off.jpg";
buttons[4].src = "img2_on.jpg";
buttons[5].src = "img2_off.jpg";
buttons[6].src = "img4_on.jpg";
buttons[7].src = "img4_off.jpg";
buttons[8].src = "img5_on.jpg";
buttons[9].src = "img5_off.jpg";
buttons[10].src = "img6_on.jpg";
buttons[11].src = "img6_off.jpg"; }

function swap(des,num) {
if (version == "good") {
document.images[names[des]].src = buttons[num].src; }}

// close the comment tag, this hides the script from really old browsers! -->
</SCRIPT>

</head>
<center><font size="5">Welcome to</font></center>
<body bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#FF00FF" background="bkg.gif"><center>
<img src="bcn-logo-soft.jpg" width="479" height="114" alt="" border="0" align="">


<BR><BR><BR><BR>
<table width="453" height="25" cellspacing="1" cellpadding="0" border="0">
<tr><!-- Row 1 -->
<td><a href="home.html" onMouseOver="swap(0,1)" onMouseOut="swap(0,0)"><img src="img1_on.jpg" NAME="home" width="151" height="25" alt="Home" border="0" align=""></a></td>

<td><a href="lawn.html" onMouseOver="swap(2,3)" onMouseOut="swap(2,2)"><img src="img3_on.jpg" NAME="lawn" width="151" height="25" alt="Lawn Care" border="0" align=""></a></td>

<td><a href="land.html" onMouseOver="swap(4,5)" onMouseOut="swap(4,4)"><img src="img2_on.jpg" NAME="land" width="151" height="25" alt="Landscaping" border="0" align=""></a></td>
</tr>

<table width="453" height="25" cellspacing="0" cellpadding="0" border="0">
<tr><!-- Row 2 -->
<td><a href="miss.html" onMouseOver="swap(6,7)" onMouseOut="swap(6,6)"><img src="img4_on.jpg" NAME="miss" width="151" height="25" alt="Mission Statement" border="0" align=""></a></td>

<td><a href="owner.html" onMouseOver="swap(8,9)" onMouseOut="swap(8,8)"><img src="img5_on.jpg" NAME="owner" width="151" height="25" alt="Owner Information" border="0" align=""></a></td>

<td><a href="ref.html" onMouseOver="swap(10,11)" onMouseOut="swap(10,10)"><img src="img6_on.jpg" NAME="ref" width="151" height="25" alt="Refrences" border="0" align=""></a></td>
</tr>

</table>

</center>
</body>
</html>

Once again, any help offered will be appreciated.

Thanks,

dan..

tea
Nervous Wreck (II) Inmate

From: Bern, Switzerland
Insane since: Aug 2000

posted posted 09-26-2000 19:10

hello, the javascript code looks allright.

but you forgot the enclosing tag of your
two tables, maybe that has some effectes?



vogonpoet
Maniac (V) Mad Scientist

From: Mi, USA
Insane since: Aug 2000

posted posted 09-26-2000 19:18

yup... I just visited your site and your first row of buttons is not appearing in my browser (netscape 4.51).. looked at your code there is a closing table tag missing... just like Tea says....

(Edit) and I hope you dont mind me mentioning but I think you have a spelling mistake in your header graphic... I think you spell 'throughout' like that .. fyi <img border=0 align=absmiddle src="http://www.ozones.com/forum/smile.gif">



[This message has been edited by vogonpoet (edited 26-09-2000).]

tea
Nervous Wreck (II) Inmate

From: Bern, Switzerland
Insane since: Aug 2000

posted posted 09-26-2000 19:27

there is another problem:
i don't know docs script but there is a
wrong numbering in the swap call

it should be

swap(0,
..
swap(5,

and not
swap(0,
swap(2,
swap(4,..
swap(10,

the first parameter is the location (0..5) and
the second parameter is the img nunber (0..11)

cu, tea


« BackwardsOnwards »

Show Forum Drop Down Menu