I use .ajax to call a webservice mehod that sends an email to entered email.
I want to to show an ajax modal popup extender containg an image saying 'sendig...'
i used .ajax to call my webservice like:
var SendingModal = $find('SendMPE');
var Resend = -1;
$.ajax({
async: false,
type: "POST",
url: "FinKaynWebService.asmx/SendEmail",
data: "{'Email': '" + Email + "'}",
contentType: "application/json; charset=utf-8",
dataType: "json",
beforeSend: function() {
$("#SendMPE").show();
},
success: function(response) {
Resend = response.d;
SendingModal.hide();
},
failure: function(msg) {
alert('Sending Email failed,try later');
}
});
the problem is that my SendMPE is not showing.
<div id="SendingDiv" style="display:none;background-color:Yellow;color:Blue;">
<img id="LoadingImage" alt="Still sending" src="./Images/Sending.gif" />
<span style="margin-left:10px;">Sending...</span>
<asp:Button ID="CloseButton" runat="server" style="display:none;" />
</div>
<asp:ModalPopupExtender ID="SendMPE" X="200" Y="200" runat="server"
TargetControlID="SendHiddenButton" PopupControlID="SendingDiv"
CancelControlID="CloseButton"></asp:ModalPopupExtender>
is this this problem caused by the image or what?
Who has an idea or has already done somthin like that:loading image in a popoup.
$("#SendMeButton").live("click", function(event) { event.preventDefault(); $("#SendingDiv").show(); .it deosn' work but when i call it from link it works. – Mar 01 '11 at 22:44