Ich habe eine Schaltfläche Senden auf einer Seite. < /p>
< /code>
Auf JavaScript wird ValidatesAvetest -Funktion genannt, die alle Felder validiert. < /p>
function ValidateSaveTest(Sender) {
//do some validation, if fails return false from here. else move forward
var parameters = {};
parameters["parametersName"] = $("#" + hidTestId).val();
var succeededAjaxFn = function(result) {
if (result== true) {
var isNewVersion = confirm("Confirmation message");
if(isNewVersion)
{
//Raise server side button click event. Dont call click side event anymore.
$("#" + "").click();
}
return false;
}
}
var failedAjaxFn = function(result) { return false; }
//jquery ajax call
CallWebMethod("../Service.asmx", "IsTestUsed", parameters, succeededAjaxFn, failedAjaxFn);
//async call, always return false hence no postback from here.
//Need waiting unless ajax response is obtained.
return false;
}
< /code>
Ich muss die Server -Seitenschaltfläche anheben. Klicken Sie auf das Ereignis von JavaScript, sobald die AJAX -Antwort empfangen wird. < /P.>
Erhöhen Sie die Schaltfläche Server auf der Seite, Klicken Sie auf Ereignis von JavaScript im Ajax -Anruf ⇐ C#
-
- Similar Topics
- Replies
- Views
- Last post
-
-
Ändern Sie VAR auf 0 nach der Schaltfläche Klicken Sie auf die Schaltfläche
by Anonymous » » in HTML - 0 Replies
- 18 Views
-
Last post by Anonymous
-