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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

wonky script i cant figure out...

Status
Not open for further replies.

sumilsay

Technical User
Joined
Feb 12, 2003
Messages
69
Location
CA
hey peeps,
first and foremost, thanks for your time...

this is the html i have for thumbnails, i have about 20 thumbs:
Code:
<img src="opac_thumb_kt01.jpg" onMouseOver="javascript:rolled('thumb_kt01.jpg')"  onMouseOut="javascript:rolled('opac_thumb_kt01.jpg')" class="thumb" name="thumb" id="thumb" />
<img src="opac_thumb_kt02.jpg" onMouseOver="javascript:rolled('thumb_kt02.jpg')"  onMouseOut="javascript:rolled('opac_thumb_kt02.jpg')" class="thumb" name="thumb" id="thumb" />
<img src="opac_thumb_kt03.jpg" onMouseOver="javascript:rolled('thumb_kt03.jpg')"  onMouseOut="javascript:rolled('opac_thumb_kt03.jpg')" class="thumb" name="thumb" id="thumb" />

and here is the code i have for javascript:
Code:
<script type="text/javascript">
function rolled(source){
    document.thumb.src=source;
}
</script>

what i cant get is the rollover images to work. im trying to get it so when the user rolls over a thumb, the rolled thumb goes from a dim image to a fully opaque one.

thanks again for all your help.
me.
 
I would change your thumbs to:

Code:
<img src="opac_thumb_kt01.jpg" onMouseOver="rolled(this, 'thumb_kt01.jpg')"  onMouseOut="rolled(this, 'opac_thumb_kt01.jpg')" class="thumb" name="thumb1" id="thumb1" />
<img src="opac_thumb_kt02.jpg" onMouseOver="rolled(this, 'thumb_kt02.jpg')"  onMouseOut="rolled(this, 'opac_thumb_kt02.jpg')" class="thumb" name="thumb2" id="thumb2" />
<img src="opac_thumb_kt03.jpg" onMouseOver="rolled(this, 'thumb_kt03.jpg')"  onMouseOut="rolled(this, 'opac_thumb_kt03.jpg')" class="thumb" name="thumb3" id="thumb3" />

And your function to:

Code:
<script type="text/javascript">
<!--
function rolled(e, s){
    e.src = s;
}
-->
</script>

*cLFlaVA
----------------------------
[tt]insert funny quotation here.[/tt]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top