Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Disabling image

 
Gavi Raaghav
Ranch Hand
Posts: 82
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have an image with a hyperlink on it.Is it possible to disable the image? If yes then how?
 
Garann Means
Ranch Hand
Posts: 214
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
By disable the image, do you mean you want to not show the image, or you want the hyperlink to do nothing? Or something else?

You can hide the image by adding to the image tag.

You can prevent the hyperlink from taking any action by adding to the anchor tag.

Hope that helps..
 
Gavi Raaghav
Ranch Hand
Posts: 82
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the response.Basically i want to disable the image just like you disable a button.Basically the user can see the image but when he clicks on it nothing happens.
 
Garann Means
Ranch Hand
Posts: 214
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are you doing this dynamically? If not, the second suggestion I gave you will give you all the attributes of a linked image, but nothing should happen when the user clicks it.

If you do need to disable the link dynamically, you could try this:


I would definitely check the syntax on that, but hopefully you get the idea?
[ August 05, 2005: Message edited by: Garann Rose Means ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic