This is my document.ready code:
$(document).ready(function() { $("#dialogbox").dialog({ open: function(event, ui) {$("a.ui-dialog-titlebar-close").remove();}, bgiframe: true,autoOpen: false,closeOnEscape: false,draggable: false, show: "drop",hide: "drop",zIndex: 10000,modal: true, buttons: {'Ok': function() {$(this).dialog("close");processEmp();}} }); });
I have the following javascript code that takes one parameter:
function test(pEmp) { var a = pEmp.value); $('#dialogbox').dialog('open'); }
My question is based on the value that I pass into my test function, which in turn calls the jQuery UI dialog ('#dialogbox'), when the user clicks the βOkβ button in the dialog box, I need something (that I not sure how to do this), pass the variable βaβ, which contains my pEmp.value, to my other function processEmp (a?), which I bound to my button βOkβ.
Hoping someone can help, since I mostly need this value when the user confirms the dialog box.
Thanks.
tonyf source share