Click here to Skip to main content
15,924,452 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi,

I m uploading image and want to show the image name on mouse over or by any other method.
Please help me.
Posted
Updated 27-Feb-14 4:18am
v3
Comments
So, what is the issue?
Nelek 27-Feb-14 9:46am    
Don't think we can read minds or do astral projections to see your monitor. If you need help, the least you could do is to add some relevant code to your question or to explain your problem in such a way, that the users of CP can understand it. Otherwise, nobody will be able to help you.

Please use the "improve question" and add relevant information or a piece of code envolved. There are thousands of ways to screw things up, how are we supposed to know which one did you choose?
Krunal Rohit 27-Feb-14 9:56am    
ASP .NET ?

-KR
Member 10627896 27-Feb-14 10:39am    
enter alt="sometext" property of image

You can use Title property of image tag, like this :
HTML
<img src="smiley.gif" width="48" height="48" title="Smiley" />

Fill this property dynamically when image is successfully uploaded by the user.
This is food for thought ;)
 
Share this answer
 
Comments
Member 10403595 27-Feb-14 12:10pm    
I did not get any title property. And how to do dynamically???
Artefakt94 28-Feb-14 4:15am    
Try this :
<img src="smiley.gif" alt="Smiley face" title="Smiley" width="42" height="42">
You'll see a tooltip on hover ;)
Well this won't be done by just a Server-Side code. You'll need a client side language too.

Lets take the example of jQuery. You can show the image's name using this code:

JavaScript
$('img').hover(function () {
  alert($(this).attr('src'));
}


Now this code would take the source of the image and then show it to the user on the hover event. That is what you want. But using the serverside you can either show it on the page load, but if you want to show that on the Hover, you can do that using either jQuery or if you want to show the name in the title attribute then you can simply write it there. For example:

JavaScript
<img src="link/to/file.png" title="file.png" alt="photo" />


This way, the image's name will be shown in a title element when the user would hover over to the image.
 
Share this answer
 
 
Share this answer
 
Comments
Member 10403595 27-Feb-14 10:32am    
I m making website and I want that when my mouse goes on image then it should take image name at runtime. I should not give each time. Is there any property or method ?? I do not want to use tooltip as it gives text only.
Paddy84 27-Feb-14 10:35am    
Web Development is not my area I'm afraid.
I wish you luck getting help though.
Paddy
enter alt property and add image name in it
alt="image name"
 
Share this answer
 
Comments
Member 10403595 27-Feb-14 11:11am    
Can I get image name at runtime which user selects the image and is shown in image control.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900