click on one of the buttons in a jQuery UI dialog -


a question jquery ui dialogs. i'm creating auto-login feature , want give visual feedback. login done jquery ui dialogs.

question: how force click on submit-button?

in samples on site form hasn't got properties set, there must function triggered when button clicked manually.

i want program click on 1 of buttons in jquery ui dialog.

anyone knows how this?

when open dialog can find buttons , add ids on them select using #.

this option on dialog() function.

        open: function () {             //assign ids/classes buttons             var buttonpane$ = $(this).siblings('.ui-dialog-buttonpane');              var okbutton = buttonpane$.find('button:contains("ok")');             okbutton.addclass('ui-priority-primary');             okbutton.attr('id', 'youridhere');         } 

when need trigger click use $('#youridhere').click();

edit

if create function outside of dialog, can add dialog options and call directly instead of simulating click on button.


Comments

Popular posts from this blog

c# - how to write client side events functions for the combobox items -

exception - Python, pyPdf OCR error: pyPdf.utils.PdfReadError: EOF marker not found -