0
什麼可能是jquery加載不被稱爲的原因,我無法擊中uploadResults控制器,我用$(document).ready(function() {也離不開它。plz幫助?asp.net mvc jquery加載不叫
function showStatus() {
var progressbar = document.getElementById("progressBar");
progressbar.style.display = "block";
document.getElementById("uploadResult").style.visibility = "visible";
$(document).ready(function() {
**$("#message").load('Organization/UploadResults');**
});
return true;
}
<form action="<%= Url.Action("FileUpload", "Organization")%>" method="post" enctype="multipart/form-data" target="<%="uploadresult" + Lang.int_LangId %>" onsubmit="return showStatus()">
<input type="button" id="attachButton" value="Attach File" onclick="showAttachFile();" />
<input type="file" />
<input type="submit" value="Upload" />
</form>
<div id="message"></div>
<iframe id="<%="uploadresult" + Lang.int_LangId %>" name="<%="uploadresult" + Lang.int_LangId %>" src="<%= Url.Action("MyImage","Organization", new RouteValueDictionary(new { OrgId = OrganizationMeta.int_OrganizationId, LangID=Lang.int_LangId })) %>" width="150px" frameborder="0" height="150px" onload="showResult();">
</iframe>