I'm using jquery steps although I need to call a c# service via ajax when the first 'next' is clicked, is this possible to be called and returned before the step 2 is displayed? The following code works although the ajax event returns after step 2 is loaded.
Many thanks, any help appreciated.
Jquery steps
http://www.jquery-steps.com/Examples#basic
I've noticed these methods? Maybe these are what I need
onStepChanging: function (event, currentIndex, newIndex)
onFinishing: function (event, currentIndex)
onFinished: function (event, currentIndex)
My ajax event
$(function () {
$('a[href="#next"]').click(function () {
var url = "...";
$.ajax({
url: url,
success: function (response) {
// Form fields on second step
$("#EmailAddress").val(response.Email);
$("#FirstName").val(response.Firstname);
$("#LastName").val(response.Lastname);
},
error: function () {
alert("something went wrong");
}
});
});
});