diff --git a/js/functions.js b/js/functions.js index a13758ef9..fa25122af 100644 --- a/js/functions.js +++ b/js/functions.js @@ -1685,15 +1685,28 @@ $(document).ready(function() { } $.get($form.attr('action'), $form.serialize(), function(data) { - $('
') - .append(data) - .dialog({ - title: PMA_messages['strCreateTable'], - height: 600, - width: 900, - open: PMA_verifyTypeOfAllColumns, - buttons : button_options - }); // end dialog options + //in the case of an error, show the error message returned. + if (data.success != undefined && data.success == false) { + $('') + .append(data.error) + .dialog({ + title: PMA_messages['strCreateTable'], + height: 260, + width: 900, + open: PMA_verifyTypeOfAllColumns, + buttons : button_options + })// end dialog options + } else { + $('') + .append(data) + .dialog({ + title: PMA_messages['strCreateTable'], + height: 600, + width: 900, + open: PMA_verifyTypeOfAllColumns, + buttons : button_options + }); // end dialog options + } }) // end $.get() // empty table name and number of columns from the minimal form