I am using Sitecore 9.0.2 multistep form, where other steps data are coming from Ajax. Now scenario here is on submit of step 1, I wanted to ensure Ajax response for step 2 markup successfully came then trigger script for step 2.
Currently I am using setTimeout with 1 sec delay, but sometime there are delay in Ajax response.
Do we have any other approach to resolve this issue? Or is there any way to detect Ajax response on dynamic markup?
I tried with ajaxStart/ajaxComplete but these can apply only on 'document' and step 2 markup dynamically loading(coming from Ajax response) that is why ajaxStart/ajaxComplete not worked