title: Jquery UI dialog properties with dynamic dialog messages
body: <p>I have a form with a handful of asp.net texboxes/dropdownlists/radiobuttonlists etc and when I click submit I have an onclientclick event that does a validation check of all the controls. I want to use the Jquery UI dialog for error popups but I need a different message for each form element validation. This is what I'm doing now, and it works, but the style valign isn't working and I'm not sure how else to manipulate the dialog's properties when I'm declaring it this way. I have a background in C++ so I'm still fairly new to client side scripting.</p>
  
  <pre><code>        if (Page_ClientValidate())
          {
              var newDiv = $(document.createElement('div'));
              newDiv.attr("title", "Required Field");
              newDiv.attr("style", "vertical-align:top");
  
              if ($("#txtFirstName").val() == "") {
                  $("#txtFirstName").focus();
                  newDiv.html('Please enter your first name');
                  newDiv.dialog();
                  return false;
              }
  </code></pre>