Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

changing multiple texts with mouseover through image maps 1

Status
Not open for further replies.

CMD83

Technical User
Nov 11, 2002
68
NL
Ok here's the deal.

I have a rolloverimage of a product. On certain items (which are visual on the produktimage) it should change the image itself and a text. The text is not related to the image in the code.

I have the code for the switching, but I'm not sure on how to change the text. (This can be cought in the same function, I believe)

I use image maps to make the rollovers on differen parts of the image.

code for the image:

<img name="product" src="product_00.jpg" border="0" width="400" height="176" usemap="#map1" alt="product"/>

the image maps:
<map name ="map1">
<area shape="rect" coords="58,20,79,83" href="javascript:void(null)" onmouseover="interactionA()" alt="producta"/>
<area shape="rect" coords="30,110,70,140" href="javascript:void(null)" onmouseover="interactionB()" alt="productb"/>
<area shape="rect" coords="136,21,172,110" href="javascript:void(null)" onmouseover="interactionC()" alt="productc"/>
<area shape="rect" coords="82,60,111,104" href="javascript:void(null)" onmouseover="interactionD()" alt="productd"/>
<area shape="rect" coords="138,118,158,148" href="javascript:void(null)" onmouseover="interactionE()" alt="producte"/>
<area shape="rect" coords="72,107,134,144" href="javascript:void(null)" onmouseover="interactionF()" alt="productf"/>
</map>

function code (where I refer to preloaded images):

function interactionA() {
document.int.src = image20.src; return true;
}

any idea how to make the text change with the image?
Thanks in advance!
 
you can have the various text options in different layers (divs) and change the visibility based on which is rolled mover

[conehead]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top