replace one string to
$("#form-dialog").dialog('close');
$(this) here means another object $("#btnDone")
<script type="text/javascript">
$(document).ready(function () {
$("#form-dialog").dialog({
autoOpen: true,
modal: true,
width: 200,
draggable: true,
resizable: true
});
});
</script>
<div id="form-dialog" title="Form Submit">
<form action="default.aspx" method="post">
<input type="text" name="name" value=" " />
<input type="submit" value="submit" />
<a href="#" id="btnDone">CLOSE</a>
<script type="text/javascript">
$(document).ready(function () {
$("#btnDone").click(function () {
//I've replaced next string
// $(this) here means another object $("#btnDone")
$("#form-dialog").dialog('close');
});
});
</script>
</form>
</div>