How to close jquery dialog upon form data upload completion
My form is posting text and files(images), this all works in the backend and I have no problems with this. Its posting to itself. (php)
I have created a jquery dialog that opens as the submit button is clicked. This shows that the files are uploading.
How can I close the dialogue upon errors or once the files/data have been uploaded?
$(document).ready(function() {
$("#dialog").dialog({width: 400,autoOpen: false,hide: 'fade', show: 'fade', position: 'center', modal: 'true', closeOnEscape: true});
$("#go").click(function() {
$("#dialog").dialog('open')
});
$("#hide").click(function() {
$开发者_运维知识库("#dialog").dialog('close')
});
});
I think that it will be complete when the $(body).load()
event is fired, but I'm not 100% on that
精彩评论