This twitter bootstrap plugin builds a wizard out of a formatter tabbable structure. It allows to build a wizard functionality using buttons to go through the different wizard steps and using events allows to hook into each step individually.
I, in the first step try to validate a user input by sending an AJAX request to server and retrieve the result and want to prevent user to go through next step if result contains an error.
I made my $.ajax() call right within onNext event function but wizard goes to next step very quickly after clicking next button without even waiting for $.ajax() to finish. So I'm not able to stop processing to next step on ajax error.
Is there any workarounds for this? If yes then can I have this not within onNext event and just in another place/file?
I, in the first step try to validate a user input by sending an AJAX request to server and retrieve the result and want to prevent user to go through next step if result contains an error.
I made my
$.ajax()
call right withinonNext
event function but wizard goes to next step very quickly after clicking next button without even waiting for$.ajax()
to finish. So I'm not able to stop processing to next step on ajaxerror
.Is there any workarounds for this? If yes then can I have this not within
onNext
event and just in another place/file?Thank you