File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes HTML, CSS and JavaScript and the fly likes How to cycle between images on mouse click Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "How to cycle between images on mouse click" Watch "How to cycle between images on mouse click" New topic
Author

How to cycle between images on mouse click

Gerard Largosa
Greenhorn

Joined: Jul 11, 2006
Posts: 12
Is there a way to cycle between images when an image is clicked? I see code samples but the code uses dropdowns or buttons. I want the user to click the image itself. I have tried modifying existing code which uses dropdowns and bottons, but have been unsuccesfull so far. Any help is appreciated. Thanks.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61661
    
  67

Put an onclick handler on the image that triggers the Javascript function that swaps in the next image.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: How to cycle between images on mouse click