1

When I click on a button how do I stop an upload because it is still uploading in the background?:

Below is code:

    $(".imageCancel").click(function() {
          $(".upload_target").attr("src","#"); //iframe
  }
user1333290
  • 143
  • 1
  • 3
  • 9
  • Thanks for cleaning up your question. http://stackoverflow.com/questions/10153916/how-to-cancel-a-file-upload-by-clicking-on-a-cancel-button – 000 Apr 15 '12 at 22:59
  • http://stackoverflow.com/questions/2207501/stopping-a-iframe-from-loading-a-page-using-javascript – kirilloid Apr 15 '12 at 23:03
  • @joeframbach not sure if you are being sarcastic, but doing that is not encouraged, he should have edited the question instead of reposting a new one – ajax333221 Apr 15 '12 at 23:12

2 Answers2

0

Take a look this maybe helps to u : Jquery File Start-Cancel Upload

Akseli Palén
  • 27,244
  • 10
  • 65
  • 75
Mennan
  • 4,451
  • 13
  • 54
  • 86
0

You can just remove and then recreate input file upload element of document. it is not perfect, but it'll work.

Chinbold Gansukh
  • 1,809
  • 1
  • 15
  • 6