Dialog Boxes

HTML

<div id="WoDialog" title="Enter Work Order Number">
    <p style="text-align:center;">Please enter your work order number.</p>      
    <div><input  type="text" id="WONum" /></div>
     <select id="ddlSearchCodesStatus">
                <option value="1">Active</option>
                <option value="3">Declined</option>
                <option value="5">Expired</option>
                <option value="6">Legacy/Active</option>
                <option value="7">Pending</option>
                <option value="9">Testing</option>

            </select>
</div>

<button id="clickMe">Click Me</button>

JavaScript

//Set up the dialog box
$("#WoDialog").dialog({
    autoOpen  : false,
    modal     : true,
    buttons   : {
              'Submit' : function() {
                  var WorkOrder = $('#WONum').val();
                  alert("You clicked on OK button\nValue of the textbox is: " + WorkOrder);
                   //Now you have the value of the textbox, you can do something with it, maybe an AJAX call to your server!
              },
              'Cancel' : function() {
                  var WorkOrder = $('#WONum').val();
                  alert("You clicked on QUIT button\nValue of the textbox is: " + WorkOrder);
                  $(this).dialog('close');
              }
    }
});



//Open the Dialog box
$('#clickMe').click(function(){
    $("#WoDialog").dialog("open");
});

$('#ddlSearchCodesStatus').multiselect({
        multiple: true,
        noneSelectedText: '---Status---',
        selectedList: 1,
        header: false,
        width: 100,
        beforeopen: function (event, ui) {
           
        },
        close: function () {
           
        },
    });