0

Im using .net c# MVC3 Model. I need to show a gif called loading when I click save on the page. I used <img src="sourcepath" alt="loading" style="display:none"/> and trying to display it whenever user clicks save button using jquery. I have stored the image temporarily in views folder. Unfortunately, i could not see image on the screen. I can see its division with a small red cross cancel button.

Pls Help

user1545987
  • 243
  • 1
  • 4
  • 15
  • You have to add an url to the image in the attribute src, that's why you get an red cross. – Erwin Aug 28 '12 at 14:17

2 Answers2

1

If you're seeing the broken image icon, it means your src "sourcepath" is wrong. You would normally put static content in the Content folder of your site, and access it using /Content/imagename.jpg or /Content/Images/imagename.jpg or similar.

Jude Fisher
  • 10,688
  • 6
  • 44
  • 86
0

Try to use the search, here you can find an solution the show an spinner when doing ajax requests:

How to show loading spinner in jQuery?

Community
  • 1
  • 1
Erwin
  • 4,689
  • 3
  • 29
  • 41