diff options
-rw-r--r-- | files/js/files.js | 3 | ||||
-rw-r--r-- | files/templates/index.php | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/files/js/files.js b/files/js/files.js index 0172ab1b1a9..45931b9bae3 100644 --- a/files/js/files.js +++ b/files/js/files.js @@ -51,7 +51,8 @@ $(document).ready(function() { } }); - $('#file_newfolder_submit').click(function() { + $('#file_newfolder_form').submit(function(event) { + event.preventDefault(); $.ajax({ url: 'ajax/newfolder.php', data: "dir="+$('#dir').val()+"&foldername="+$('#file_newfolder_name').val(), diff --git a/files/templates/index.php b/files/templates/index.php index 11cf0360e1e..d2d0a237d7b 100644 --- a/files/templates/index.php +++ b/files/templates/index.php @@ -13,7 +13,7 @@ </form> <form id="file_newfolder_form"> <input type="text" class="prettybutton" name="file_newfolder_name" id="file_newfolder_name" value="New Folder" /> - <input class="prettybutton" type="button" id="file_newfolder_submit" name="file_newfolder_submit" value="OK" /> + <input class="prettybutton" type="submit" id="file_newfolder_submit" name="file_newfolder_submit" value="OK" /> </form> <a href="" title="" class="download">Download</a> <a href="" title="" class="share">Share</a> |