$(document).ready(function()
{
$(\"#create-user\").button().click(function()
{
$(\"#dialog-form\").load(\'test.html\').dialog({ modal:true, });
for closing the dialog you can use,
$("#dialog-form").dialog('close');
SimpleModal will automatically bind the close function (using the onclick event) to any element inside the dialog with the simplemodal-close class.
In addition, you can programmatically close the currently opened dialog by calling $.modal.close();
This means: in your closeWindow()-function, you could simply enter the line:
$.modal.close();
have this code.
<form ... onsubmit="window.location.assign('#close')">
Sample.
HTML:
<input type="button" onclick='pop = window.open("http://www.google.com");' value="Click Me" />
<a href="#" onclick="pop.close();">Close</a>
Javascript:
<script>
var pop;
</script>
This works. Good luck!