ASP.net
Awesome
Learn
Forum
Buy
Demos
Sign In
☾
☀
Switch to
Dark
Light
Mode
this site works best with javascript enabled
Ask Question
Last opened popup
Title:
B
I
{code}
?
I am using Jquery Hotkeys plugin, to submit forms in popupformactions popups. My problem is i have multiple popups open one inside the other (parent and child) so multiple popupforms will be opened, when press the key that have to submit the child form ... it submits all opened formpopups in the DOM which is wrong, i need only to submit the last opened formpopup. any ideas about handling this issue.
Save Changes
Cancel
micro0o2011
asked at 12 Jan 2015
Answers
B
I
{code}
?
if you're using jQueryUI popup you can bind to the dialogopen event, for the rest (bootstrap, inline) you can modify them and add trigger the event on api.open so for example this script will close any popup 1 second after you open it: $(document).on('dialogopen', function(e){ setTimeout(function(){ $(e.target).data("api").close(); },1000); }); I guess you need to save/overwrite the e.target in a variable lastPopupOpened
Save Changes
Cancel
Omu
answered at 12 Jan 2015
please
Sign In
to leave an answer
By accessing this site, you agree to store cookies on your device and disclose information in accordance with our
cookie policy
and
privacy policy
.
OK