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


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
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: 60752
    
  65

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]
 
jQuery in Action, 2nd edition
 
subject: How to cycle between images on mouse click
 
Similar Threads
is null question
Question Using getClassLoader().getResource() With an Executable Jar
Tough Question on Images and Tiles
image uploading and selection an image from many images?
Mouse shift event coding - to trigger a predetermined sequence of images to a GUI