javascript - Wait for confirmation in .each statement -
i'm looping through elements , want toggle bootstrap modal if condition met, , when condition met want user choose appropriate action clicking button in modal. i'm having issue modal called , loop continues - result being modal shows , hides.
how stop loop until user confirmation obtained thru bootstrap modal?
you use confirm()
synchronous (blocks code until user selects option) won't styled , bit nasty.
otherwise you'll have rethink code/approach 'modal' dialogs in jquery not same modal windows in winforms.
some possible options might nicer multiple dialog popups:
- loop through elements first , present single dialog options on
- use checkboxes/option boxes against each row needs action
alternatively, change loop exit after first dialog shown, when dialog closed, restart event/action/loop first 1 have been handled , pick next one.
Comments
Post a Comment