jquery - How to display a bootstrap popup box after a file is selected from file browser window? -
So, I have a drop-down list that contains a button to import files from the system:
& lt; Input type = "file" id = "file selected" class = "upload" data-toggle = "modal" value = "import" data-target = "# import data" /> Therefore, when the user selects the file from the file browser and clicks on "OK", then a bootstrap modal box should be displayed which displays the details of the file that is selected I went. Code for Bootstrap Popup:
& lt; Div class = "modal fade" id = "IMPORTDATA" data-background = "static" tabindex = "- 1" role = "dialog" aria-labeled = "phthomologin label" array-hidden = "true" & gt; & Lt; Div class = "modal-dialog" & gt; & Lt; Div class = "modal-content" & gt; & Lt; Div id = "popupDiv" ng-show = "popup" class = "col-sm-12" & gt; & Lt ;! - Here's more content - & gt; & Lt; / Div & gt; & Lt; / Div & gt; & Lt; / Div & gt; & Lt; / Div & gt; Popup is the code to speed up:.
Select $ ("# fileSelected") (function () {$ scope.showPopUp ();}); $ Scope.showPopUp = function () {$ scope.popUp = true; For (Var I = 0; I & lt; 9; ++ i) {$ Timeout (function () {$ scope.uploadCompleted + = 0.1 * ($ scope.uploadTotal); console.log ($ scope.uploadCompleted) ;}, 4000); } $ Scope.checkComplete (); } The problem is that when I click "OK" on the file browser window, this model popup box is not visible. It just fades the background and does nothing.
You can trigger the changed event of file input.
Example:
$ (" # fileSelected "). Change (function () {$ (". Modal"). Show ();});
Comments
Post a Comment