Note that there are some explanatory texts on larger screens.

plurals
  1. PORefresh images jquery
    primarykey
    data
    text
    <p>I have uploading images with ajax form in my ASp.Net application. I need to refresh images, so I try this:</p> <pre><code>$(function () { $(".fileUploadForm").ajaxForm({ success: function (data, text, xhr, form) { var tmp = jQuery(this).closest("img[class=imageResource]").attr('src'); } }); }); </code></pre> <p>Here is my image:</p> <pre><code> &lt;img class="imageResource" alt="picture" src="@Url.Action("Picture", new { id = Model.Id })" /&gt; </code></pre> <p>How can I find and rewrite image source with the same name</p> <p><strong>Update</strong></p> <p>Here is my html:</p> <pre><code>&lt;div class="thumbnail"&gt; &lt;a target="_blank" href="/Template/OriginalPicture/8b8c824b-9605-4931-9fe2-1f5979baca42"&gt; &lt;img class="imageResource" src="/Template/Picture/8b8c824b-9605-4931-9fe2-1f5979baca42" alt="picture"&gt; &lt;/a&gt; &lt;div class="caption"&gt; &lt;div style="margin-bottom: 5px;"&gt; &lt;form class="form-horizontal fileUploadForm" method="post" enctype="multipart/form-data" action="/Template/PictureResource?resourceId=8b8c824b-9605-4931-9fe2-1f5979baca42&amp;configId=aa383b5a-23b2-4780-965e-ef4e95cd3fa2&amp;pageNumber=1"&gt; &lt;div class="input-append"&gt; &lt;input type="file" name="picture"&gt; &lt;input class="span1" type="text" size="128" style="width: 86px;"&gt; &lt;button class="btn browse" type="button"&gt; ...&lt;/button&gt; &lt;button class="btn" type="submit"&gt;Upload&lt;/button&gt; &lt;/div&gt; &lt;/form&gt; &lt;/div&gt; &lt;/div&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload