Wednesday, May 2, 2012

Tabs after closing dialog window

I am working with a form in JQuery. I have a dialog box that I need to be able to close with "ESCAPE", which I have done. The issue is that tab index does no seem to function correct. What I have is a dialog box in between two input textboxes. Ideally what I would like to happen is for the use to tab to first input box, enter input. Tab to the message icon that opens the dialog box, view the message, close the message and then be on the next input. What happens is that it take me to the very first hyper link in the page. Any ideas on how to set the dialog box to place the cursor on the second text box once the dialog is closed?



So I have the following code but it fires the event on page load and not when I close the dialog, any ideas?



    var $dialog = $('<div></div>')
.html('test message1')
.dialog({
autoOpen: false,
resizable: false ,
closeOnEscape: true,
title: 'Account Message1',
close: $("#shipToContainer").find("input").focus(),
});




No comments:

Post a Comment