Closed Thread Icon

Preserved Topic: Doc's MouseOver Script?? Pages that link to <a href="https://ozoneasylum.com/backlink?for=18010" title="Pages that link to Preserved Topic: Doc&amp;#039;s MouseOver Script??" rel="nofollow" >Preserved Topic: Doc&#039;s MouseOver Script??\

 
Author Thread
Aquilo
Bipolar (III) Inmate

From: las vegas, nevada, us
Insane since: Nov 2000

posted posted 06-04-2001 02:46

What am I doing wrong, every time I try to use the script with more
then two rollovers I get errors!
http://www.jasonarencibia.com/test/x/

<A HREF="http://x-design.atari.org
" TARGET=_blank> </A>

kars10
Bipolar (III) Inmate

From: Europe
Insane since: Mar 2001

posted posted 06-04-2001 05:33

hey aquilo, how's it going?
I know that script by heart because I learned every basic DHTML-thing from it.
So let me help you:

I copied your code and got rid of them errors:

This is the first one. the initialisation of the array:.............................

if (document.images) {
names = new Array( "zero" , "one" , "two" , "three");

........................................................................................................
I called them nubers so it is easier to see the beauty o the code.
You can call them whatever you want but as DocOzone said:
YOU START WITH ZERO. that means in your array:
names = new Array( "me" , "resume" , "atari" , "design" );
"me" would referred to as 0 (or "zero")
"resume" would referred to as 1 (or "one")
"atari" would referred to as 2(or "two")
"design" would referred to as 3 (or "three")

the next thing is to bring them together:........................................
<a href="http://www.jasonarencibia.com/me"
onMouseover="swap(0,2);
window.status='about me...';
return true;"
onMouseout="swap(0,0);
window.status=MyNameIs;
return true;"><img src="/img-hen/gui/button/me1.gif" name="zero" border="0"></a>
.........................................................................................................................................................
ok, this should be the example to explain:
swap(0,2) swaps the object with the value 0 (which would be the first name in our list=>"zero)
with the button with the value 2 which would be /img-hen/gui/button/me2.gif";
on the mouse out, the object valued 0 called "zero" by my code but "me" in yours is swapped
to the picture with the value 0 which would be the first picture initialized: "/img-hen/gui/button/me1.gif";
.........................................................................................................................................................

<a href="http://www.jasonarencibia.com/resume.htm"
onMouseover="swap(1,3);
window.status='my resume';
return true;"
onMouseout="swap(1,1);
window.status=MyNameIs;
return true;"><img src="/img-hen/gui/button/me1.gif" name="one" border="0"></a>

<a href="http://www.jasonarencibia.com/atari"
onMouseover="swap(2,6);
window.status='atari';
return true"
onMouseout="swap(2,2);
window.status=MyNameIs;
return true;"><img src="/img-hen/gui/button/me1.gif" name="two" border="0"></a>

<a href="http://www.jasonarencibia.com/design/"
onMouseover="swap(3,7);
window.status='design';
return true;"
onMouseout="swap(3,3);
window.status=MyNameIs;
return true;"><img src="/img-hen/gui/button/me1.gif" name="three" border="0"></a></td>
............................................................................................................................................................

Some other infos:
Using numbers starting from "zero" to call the objects is easier than individual words. You can refer to them easier.
And Always check what object you want to swap what picture before ou come in here and ask *g* (They don;t like it...)
AND NEVER EVER lose the fun coding.
k10


only change remains

Aquilo
Bipolar (III) Inmate

From: las vegas, nevada, us
Insane since: Nov 2000

posted posted 06-04-2001 09:11

Thank you!!!!! I guess the hardest thing to get "PAST"(edit - can't spell) is the simplest step or as I call it language with Perl I got the feel for the language so that I could almost speak it - JavaScript is almost the same in form but I know allot less and trip on the little things *shrug* thanks for explaining the code and I see where my misunderstanding of Doc's explanation is and the Array hehe I changed lots around and the last one was with the Array because Atari or three is before four or design but over looked trying to fix "new Image"... any way Thank you for the great help!!!

<A HREF="http://x-design.atari.org
" TARGET=_blank> </A>

[This message has been edited by Aquilo (edited 06-04-2001).]

linear
Paranoid (IV) Inmate

From: other places
Insane since: Mar 2001

posted posted 06-04-2001 16:14

There you go, a perfect example of how to ask for help and get a response.

The key ingredient (for those who are wondering): effort.

When you try and fail, this is the place to come for help. If you don't try......

kars10
Bipolar (III) Inmate

From: Europe
Insane since: Mar 2001

posted posted 06-04-2001 16:23

aquilo: you're welcome

linear: such a world would be great, hn? But whenever I am the one who ask the stupid questoin nobody answers me... *Buhuhu*
But then there is this 'search'-thing which contains already everything basical I need to know...
Oh, did you say try and effort? Oh, hmm, well, that changes the whole stuff...
k10





only change remains

« BackwardsOnwards »

Show Forum Drop Down Menu