got it worked out I think.

R

Richard

Could it get any simpler?
Found this little trick on a site and it works just fine.
<a href="#" onMouseOver="document.image1.src='image2.jpg'">

with an onmouseout, image1 is restored to it's place.
Since there is no javascript involved per se, it should work in most
browsers yes?
 
M

Matthias Gutfeldt

Richard said:
Could it get any simpler?
Found this little trick on a site and it works just fine.
<a href="#" onMouseOver="document.image1.src='image2.jpg'">

with an onmouseout, image1 is restored to it's place.
Since there is no javascript involved per se, it should work in most
browsers yes?

No, not at all. You simply put the javascript in the value of the
onMouseOver attribute. onmouseover is an event handler, and event
handler require a script engine (in this case the client-side javascript
engine).


Matthias
 
H

Hywel Jenkins

Could it get any simpler?
Found this little trick on a site and it works just fine.
<a href="#" onMouseOver="document.image1.src='image2.jpg'">

with an onmouseout, image1 is restored to it's place.
Since there is no javascript involved per se, it should work in most
browsers yes?

What do you think the "onMouseOver" is? That's a JavaScript event. The
code between the "" for the event is JavaScript. When JavaScript is
missing the code won't even get touched as the onMouseOver event won't
fire.
 
R

Richard

Matthias said:
Richard schrieb:
No, not at all. You simply put the javascript in the value of the
onMouseOver attribute. onmouseover is an event handler, and event
handler require a script engine (in this case the client-side
javascript
engine).

Matthias

That's what I always thought but never knew for sure.
At least the trick works.
 
S

Steve Pugh

Richard said:
Could it get any simpler?
Found this little trick on a site and it works just fine.
<a href="#" onMouseOver="document.image1.src='image2.jpg'">

with an onmouseout, image1 is restored to it's place.
Since there is no javascript involved per se, it should work in most
browsers yes?

That is JavaScript.

Steve
 
J

Jordge W. L.

Richard said:
Could it get any simpler?
Found this little trick on a site and it works just fine.
<a href="#" onMouseOver="document.image1.src='image2.jpg'">

ahhh!
but there's another problem. it's very slow over the internet because
the image is loaded
everytime you move your mouse over the icon/image. and if the image is
cached on your hard drive,
it's still slow because you have to reference the file over the
internet. so, it works, but
not a good idea.
 
W

Woolly Mittens

Richard said:
Since there is no javascript involved per se, it should work in most


<script>
document.image1.src='image2.jpg'
</script>

Also the images you're trying to load, won't be retrieved before you
mouse-over the image. On a slow connection the reaction time of the
mouseover will be too high.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top