473,387 Members | 1,561 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Need help with positioned mouseover

This is really puzzling me, maybe its just my feeble brain, that cant see
what Im doing wrong. I am trying to create a page that loads up several
thumbnail images, that when onMouseover. the larger image appears, but
leaves the description text intact. I can easily get it to work the way I
want with just one image on the page, but whenever or whereever on the
page
i try to use the same code (except changing the position) to have another
picture (testing by just using the same pic over again) it stops working..

HEre are the two pages to compare. Is it something obvious that is just
escaping me?

This one works fine

http://freewebs.com/imagetest/zoom.html

This one does not????

http://freewebs.com/imagetest/zoom2.html
Any idea why? or how I can get it to do what I want?

email (remove x) or reply here, any help GREATLY appreciated..

:)
Diane

Feb 23 '06 #1
3 929
Diane wrote:
http://freewebs.com/imagetest/zoom.html
I couldn't access any of those url's from my country, I had to use "The
Clock" <URL:http://www.the-cloak.com> ='/
Any idea why? or how I can get it to do what I want?
email (remove x) or reply here, any help GREATLY appreciated..


Your code is looking strange Mrs. Diana :)

<DIV STYLE='position=absolute; left:150'><A HREF='#'
ONMOUSEOVER="document.pic.src='big.jpg'"
ONMOUSEOUT="document.pic.src='thumb.jpg'">
<IMG SRC='thumb.jpg' NAME='pic' BORDER='0'></A></DIV>
You should try to follow the w3.org <URL:http://www.w3.org> standards,
for example the name attribute already got deprecated.

Besides that, the problem is: when you have two elements with the same
name, they become a collection. Ex:
<input type="text" name="field" />
<input type="text" name="field" />

To access the first and the second one, you must use form.field[0] and
form.field[1] respectively. The same applies to your images.
--
Jonas Raoni Soares Silva
http://www.jsfromhell.com
Feb 23 '06 #2
Diane wrote:
This is really puzzling me, maybe its just my feeble brain, that cant see
what Im doing wrong. I am trying to create a page that loads up several
thumbnail images, that when onMouseover. the larger image appears, but
leaves the description text intact. I can easily get it to work the way I
want with just one image on the page, but whenever or whereever on the
page
i try to use the same code (except changing the position) to have another
picture (testing by just using the same pic over again) it stops working..
Jonas has given you the reason it fails. You might also consider
ditching the A element altogether, just use a mousever on the thumbnail
itself. Then you can do something like:

<img
style="cursor: pointer;"
src="thumb.jpg"
onmouseover="this.src = 'big.jpg'"
onmouseout="this.src = 'thumb.jpg'"


Pre-loading the 'big' images will help to improve response times.
[...]
--
Rob
Feb 23 '06 #3
Thank you both!

Ahhh , duhhh using the SAME name attribute, ya that would do it.. sometimes
I just dont see the obvious.

Also I tried using the cursor:pointer property and that seems to work even
better. Now if I can just figure out how to get the z-index working the way
I want, so that when the big pic comes up, it lays over the text on the next
column over

Thanks for your help.

Feb 23 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Ethan Trewhitt | last post by:
www.adobe.com has a set of menus that popdown when there's a mouseover, positioned nicely below the buttons shown. However, they use absolute postitioning ... is there a way to do such positioning...
14
by: J. Makela | last post by:
Hallo. This should be a pretty entertaining question for you *real* javascript writers.. I, being the lowly photoshop guy at an ad agency made the mistake of actually saying "HTML" in a...
2
by: markszlazak | last post by:
I'm a relatively slow response of table cells changing their background color with mouseover/our in IE6 (Win 2K) but the response is fine (fast) in Firefox. Why? The code is below. Sorry about the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.