iCheck Enable/Disable Input-File(bootstrap) Button when i check a checkboxStyling an input type=“file” buttonDisable/enable an input with jQuery?jQuery disable/enable submit buttonjQuery - checkbox enable/disableHow to enable bootstrap tooltip on disabled button?Disabling and enabling a html input buttonWhat is the easiest way to disable/enable buttons and links (jQuery + Bootstrap)Best way to disable button in Twitter's BootstrapiCheck check if checkbox is checkedCheck an iCheck checkbox using JavaScript?
Why is it 出差去 and not 去出差?
How is linear momentum conserved in circular motion?
Why things float in space, though there is always gravity of our star is present
What is the highest power supply a Raspberry pi 3 B can handle without getting damaged?
No shading in ContourPlot3D
I calculated that we should be able to see the sun well beyond the observable universe. Where did I go wrong?
Can a character learn spells from someone else's spellbook and then sell it?
Why is Havana covered in 5-digit numbers in Our Man in Havana?
Setting up the trap
Leaving job close to major deadlines
"Correct me if I'm wrong"
I found a password with hashcat but it doesn't work
In a list with unique pairs A, B, how can I sort them so that the last B is the first A in the next pair?
How do I find which software is doing an SSH connection?
How to take photos with a yellowish tone and point-and-shoot film camera look?
Can the pre-order traversal of two different trees be the same even though they are different?
「捨ててしまう」why is there two て’s used here?
What is this airplane that sits in front of Barringer High School in Newark, NJ?
If the mass of the Earth is decreasing by sending debris in space, does its angular momentum also decrease?
Print the new site header
Scaling an object to change its key
Explicit song lyrics checker
How to modify a string without altering its text properties
How can I restore a master database from its bak file?
iCheck Enable/Disable Input-File(bootstrap) Button when i check a checkbox
Styling an input type=“file” buttonDisable/enable an input with jQuery?jQuery disable/enable submit buttonjQuery - checkbox enable/disableHow to enable bootstrap tooltip on disabled button?Disabling and enabling a html input buttonWhat is the easiest way to disable/enable buttons and links (jQuery + Bootstrap)Best way to disable button in Twitter's BootstrapiCheck check if checkbox is checkedCheck an iCheck checkbox using JavaScript?
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;
Hello im using iCheck(http://icheck.fronteed.com/)
The problem is, when i click the checkbox, input-file button works but appears to be "disabled" but it still in gray color, not in green.
I'm using two events, ifChecked/ifUnchecked.
I tried attr
, removeclass
, addclass
before, using instead of .prop()
;
<input id="Archivo" name="Archivo" type="file" accept=".pdf,.doc" disabled />
$("#Archivo").fileinput(
language: "es",
browseClass: "btn btn-primary",
showCaption: true,
showRemove: false,
showUpload: false,
browseLabel: " Buscar",
allowedFileExtensions: ["pdf", "doc"],
elErrorContainer: "#divErrorImagen",
maxFileSize: 122880
);
$('input').on('ifChecked', function (event)
console.log("Checked OK")
$('#Archivo').prop("disabled", false);
);
$('input').on('ifUnchecked', function (event)
console.log("Unchecked OK")
$('#Archivo').prop("disabled", true);
);
javascript jquery checkbox file-io icheck
add a comment |
Hello im using iCheck(http://icheck.fronteed.com/)
The problem is, when i click the checkbox, input-file button works but appears to be "disabled" but it still in gray color, not in green.
I'm using two events, ifChecked/ifUnchecked.
I tried attr
, removeclass
, addclass
before, using instead of .prop()
;
<input id="Archivo" name="Archivo" type="file" accept=".pdf,.doc" disabled />
$("#Archivo").fileinput(
language: "es",
browseClass: "btn btn-primary",
showCaption: true,
showRemove: false,
showUpload: false,
browseLabel: " Buscar",
allowedFileExtensions: ["pdf", "doc"],
elErrorContainer: "#divErrorImagen",
maxFileSize: 122880
);
$('input').on('ifChecked', function (event)
console.log("Checked OK")
$('#Archivo').prop("disabled", false);
);
$('input').on('ifUnchecked', function (event)
console.log("Unchecked OK")
$('#Archivo').prop("disabled", true);
);
javascript jquery checkbox file-io icheck
add a comment |
Hello im using iCheck(http://icheck.fronteed.com/)
The problem is, when i click the checkbox, input-file button works but appears to be "disabled" but it still in gray color, not in green.
I'm using two events, ifChecked/ifUnchecked.
I tried attr
, removeclass
, addclass
before, using instead of .prop()
;
<input id="Archivo" name="Archivo" type="file" accept=".pdf,.doc" disabled />
$("#Archivo").fileinput(
language: "es",
browseClass: "btn btn-primary",
showCaption: true,
showRemove: false,
showUpload: false,
browseLabel: " Buscar",
allowedFileExtensions: ["pdf", "doc"],
elErrorContainer: "#divErrorImagen",
maxFileSize: 122880
);
$('input').on('ifChecked', function (event)
console.log("Checked OK")
$('#Archivo').prop("disabled", false);
);
$('input').on('ifUnchecked', function (event)
console.log("Unchecked OK")
$('#Archivo').prop("disabled", true);
);
javascript jquery checkbox file-io icheck
Hello im using iCheck(http://icheck.fronteed.com/)
The problem is, when i click the checkbox, input-file button works but appears to be "disabled" but it still in gray color, not in green.
I'm using two events, ifChecked/ifUnchecked.
I tried attr
, removeclass
, addclass
before, using instead of .prop()
;
<input id="Archivo" name="Archivo" type="file" accept=".pdf,.doc" disabled />
$("#Archivo").fileinput(
language: "es",
browseClass: "btn btn-primary",
showCaption: true,
showRemove: false,
showUpload: false,
browseLabel: " Buscar",
allowedFileExtensions: ["pdf", "doc"],
elErrorContainer: "#divErrorImagen",
maxFileSize: 122880
);
$('input').on('ifChecked', function (event)
console.log("Checked OK")
$('#Archivo').prop("disabled", false);
);
$('input').on('ifUnchecked', function (event)
console.log("Unchecked OK")
$('#Archivo').prop("disabled", true);
);
javascript jquery checkbox file-io icheck
javascript jquery checkbox file-io icheck
edited Mar 25 at 6:26
Frann Lp
asked Mar 25 at 6:10
Frann LpFrann Lp
33
33
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
Try using fileinput plugin disable and enable methods
$(document).ready(function()
$("#Archivo").fileinput(
language: "es",
browseClass: "btn btn-primary",
showCaption: true,
showRemove: false,
showUpload: false,
browseLabel: " Buscar",
allowedFileExtensions: ["pdf", "doc"],
elErrorContainer: "#divErrorImagen",
maxFileSize: 122880
);
$('#checkbox').iCheck(
checkboxClass: 'icheckbox_minimal',
radioClass: 'iradio_minimal',
increaseArea: '20%'
);
$('input').on('ifChecked', function(event)
console.log("Checked OK")
$('#Archivo').fileinput('disable');
);
$('input').on('ifUnchecked', function(event)
console.log("Unchecked OK")
$('#Archivo').fileinput('enable');
);
);
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/iCheck/1.0.2/skins/all.css" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/iCheck/1.0.2/icheck.min.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-fileinput/4.5.3/css/fileinput.css" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-fileinput/4.5.3/js/fileinput.js"></script>
<input id="Archivo" name="Archivo" type="file" accept=".pdf,.doc" disabled />
<input type="checkbox" id="checkbox">
1.- Load page Input file is Disabled 2.- I Check the checkbox -> Input-File Enabled (Works Ok) 3.- I Uncheck the checkbox -> Input-File disable(Not working) this event is not working no idea why
– Frann Lp
Mar 25 at 7:24
It worked now! Thanks so much :) !! greetings from méxico
– Frann Lp
Mar 25 at 7:29
welcome @FrannLp
– Aswin Kumar
Mar 25 at 7:30
add a comment |
$('input[type=checkbox]').change(function()
if ($("#ifChecked").prop('checked'))
console.log("Checked OK")
$('#Archivo').prop("disabled", false);
else
$('#Archivo').prop("disabled", true);
);
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<input id="Archivo" name="Archivo" type="file" accept=".pdf,.doc" disabled />
<input type="checkbox" name="ifChecked" id="ifChecked"> I ifChecked<br>
add a comment |
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55332105%2ficheck-enable-disable-input-filebootstrap-button-when-i-check-a-checkbox%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
Try using fileinput plugin disable and enable methods
$(document).ready(function()
$("#Archivo").fileinput(
language: "es",
browseClass: "btn btn-primary",
showCaption: true,
showRemove: false,
showUpload: false,
browseLabel: " Buscar",
allowedFileExtensions: ["pdf", "doc"],
elErrorContainer: "#divErrorImagen",
maxFileSize: 122880
);
$('#checkbox').iCheck(
checkboxClass: 'icheckbox_minimal',
radioClass: 'iradio_minimal',
increaseArea: '20%'
);
$('input').on('ifChecked', function(event)
console.log("Checked OK")
$('#Archivo').fileinput('disable');
);
$('input').on('ifUnchecked', function(event)
console.log("Unchecked OK")
$('#Archivo').fileinput('enable');
);
);
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/iCheck/1.0.2/skins/all.css" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/iCheck/1.0.2/icheck.min.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-fileinput/4.5.3/css/fileinput.css" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-fileinput/4.5.3/js/fileinput.js"></script>
<input id="Archivo" name="Archivo" type="file" accept=".pdf,.doc" disabled />
<input type="checkbox" id="checkbox">
1.- Load page Input file is Disabled 2.- I Check the checkbox -> Input-File Enabled (Works Ok) 3.- I Uncheck the checkbox -> Input-File disable(Not working) this event is not working no idea why
– Frann Lp
Mar 25 at 7:24
It worked now! Thanks so much :) !! greetings from méxico
– Frann Lp
Mar 25 at 7:29
welcome @FrannLp
– Aswin Kumar
Mar 25 at 7:30
add a comment |
Try using fileinput plugin disable and enable methods
$(document).ready(function()
$("#Archivo").fileinput(
language: "es",
browseClass: "btn btn-primary",
showCaption: true,
showRemove: false,
showUpload: false,
browseLabel: " Buscar",
allowedFileExtensions: ["pdf", "doc"],
elErrorContainer: "#divErrorImagen",
maxFileSize: 122880
);
$('#checkbox').iCheck(
checkboxClass: 'icheckbox_minimal',
radioClass: 'iradio_minimal',
increaseArea: '20%'
);
$('input').on('ifChecked', function(event)
console.log("Checked OK")
$('#Archivo').fileinput('disable');
);
$('input').on('ifUnchecked', function(event)
console.log("Unchecked OK")
$('#Archivo').fileinput('enable');
);
);
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/iCheck/1.0.2/skins/all.css" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/iCheck/1.0.2/icheck.min.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-fileinput/4.5.3/css/fileinput.css" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-fileinput/4.5.3/js/fileinput.js"></script>
<input id="Archivo" name="Archivo" type="file" accept=".pdf,.doc" disabled />
<input type="checkbox" id="checkbox">
1.- Load page Input file is Disabled 2.- I Check the checkbox -> Input-File Enabled (Works Ok) 3.- I Uncheck the checkbox -> Input-File disable(Not working) this event is not working no idea why
– Frann Lp
Mar 25 at 7:24
It worked now! Thanks so much :) !! greetings from méxico
– Frann Lp
Mar 25 at 7:29
welcome @FrannLp
– Aswin Kumar
Mar 25 at 7:30
add a comment |
Try using fileinput plugin disable and enable methods
$(document).ready(function()
$("#Archivo").fileinput(
language: "es",
browseClass: "btn btn-primary",
showCaption: true,
showRemove: false,
showUpload: false,
browseLabel: " Buscar",
allowedFileExtensions: ["pdf", "doc"],
elErrorContainer: "#divErrorImagen",
maxFileSize: 122880
);
$('#checkbox').iCheck(
checkboxClass: 'icheckbox_minimal',
radioClass: 'iradio_minimal',
increaseArea: '20%'
);
$('input').on('ifChecked', function(event)
console.log("Checked OK")
$('#Archivo').fileinput('disable');
);
$('input').on('ifUnchecked', function(event)
console.log("Unchecked OK")
$('#Archivo').fileinput('enable');
);
);
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/iCheck/1.0.2/skins/all.css" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/iCheck/1.0.2/icheck.min.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-fileinput/4.5.3/css/fileinput.css" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-fileinput/4.5.3/js/fileinput.js"></script>
<input id="Archivo" name="Archivo" type="file" accept=".pdf,.doc" disabled />
<input type="checkbox" id="checkbox">
Try using fileinput plugin disable and enable methods
$(document).ready(function()
$("#Archivo").fileinput(
language: "es",
browseClass: "btn btn-primary",
showCaption: true,
showRemove: false,
showUpload: false,
browseLabel: " Buscar",
allowedFileExtensions: ["pdf", "doc"],
elErrorContainer: "#divErrorImagen",
maxFileSize: 122880
);
$('#checkbox').iCheck(
checkboxClass: 'icheckbox_minimal',
radioClass: 'iradio_minimal',
increaseArea: '20%'
);
$('input').on('ifChecked', function(event)
console.log("Checked OK")
$('#Archivo').fileinput('disable');
);
$('input').on('ifUnchecked', function(event)
console.log("Unchecked OK")
$('#Archivo').fileinput('enable');
);
);
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/iCheck/1.0.2/skins/all.css" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/iCheck/1.0.2/icheck.min.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-fileinput/4.5.3/css/fileinput.css" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-fileinput/4.5.3/js/fileinput.js"></script>
<input id="Archivo" name="Archivo" type="file" accept=".pdf,.doc" disabled />
<input type="checkbox" id="checkbox">
$(document).ready(function()
$("#Archivo").fileinput(
language: "es",
browseClass: "btn btn-primary",
showCaption: true,
showRemove: false,
showUpload: false,
browseLabel: " Buscar",
allowedFileExtensions: ["pdf", "doc"],
elErrorContainer: "#divErrorImagen",
maxFileSize: 122880
);
$('#checkbox').iCheck(
checkboxClass: 'icheckbox_minimal',
radioClass: 'iradio_minimal',
increaseArea: '20%'
);
$('input').on('ifChecked', function(event)
console.log("Checked OK")
$('#Archivo').fileinput('disable');
);
$('input').on('ifUnchecked', function(event)
console.log("Unchecked OK")
$('#Archivo').fileinput('enable');
);
);
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/iCheck/1.0.2/skins/all.css" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/iCheck/1.0.2/icheck.min.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-fileinput/4.5.3/css/fileinput.css" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-fileinput/4.5.3/js/fileinput.js"></script>
<input id="Archivo" name="Archivo" type="file" accept=".pdf,.doc" disabled />
<input type="checkbox" id="checkbox">
$(document).ready(function()
$("#Archivo").fileinput(
language: "es",
browseClass: "btn btn-primary",
showCaption: true,
showRemove: false,
showUpload: false,
browseLabel: " Buscar",
allowedFileExtensions: ["pdf", "doc"],
elErrorContainer: "#divErrorImagen",
maxFileSize: 122880
);
$('#checkbox').iCheck(
checkboxClass: 'icheckbox_minimal',
radioClass: 'iradio_minimal',
increaseArea: '20%'
);
$('input').on('ifChecked', function(event)
console.log("Checked OK")
$('#Archivo').fileinput('disable');
);
$('input').on('ifUnchecked', function(event)
console.log("Unchecked OK")
$('#Archivo').fileinput('enable');
);
);
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/iCheck/1.0.2/skins/all.css" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/iCheck/1.0.2/icheck.min.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-fileinput/4.5.3/css/fileinput.css" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-fileinput/4.5.3/js/fileinput.js"></script>
<input id="Archivo" name="Archivo" type="file" accept=".pdf,.doc" disabled />
<input type="checkbox" id="checkbox">
answered Mar 25 at 6:50
Aswin KumarAswin Kumar
2,4191420
2,4191420
1.- Load page Input file is Disabled 2.- I Check the checkbox -> Input-File Enabled (Works Ok) 3.- I Uncheck the checkbox -> Input-File disable(Not working) this event is not working no idea why
– Frann Lp
Mar 25 at 7:24
It worked now! Thanks so much :) !! greetings from méxico
– Frann Lp
Mar 25 at 7:29
welcome @FrannLp
– Aswin Kumar
Mar 25 at 7:30
add a comment |
1.- Load page Input file is Disabled 2.- I Check the checkbox -> Input-File Enabled (Works Ok) 3.- I Uncheck the checkbox -> Input-File disable(Not working) this event is not working no idea why
– Frann Lp
Mar 25 at 7:24
It worked now! Thanks so much :) !! greetings from méxico
– Frann Lp
Mar 25 at 7:29
welcome @FrannLp
– Aswin Kumar
Mar 25 at 7:30
1.- Load page Input file is Disabled 2.- I Check the checkbox -> Input-File Enabled (Works Ok) 3.- I Uncheck the checkbox -> Input-File disable(Not working) this event is not working no idea why
– Frann Lp
Mar 25 at 7:24
1.- Load page Input file is Disabled 2.- I Check the checkbox -> Input-File Enabled (Works Ok) 3.- I Uncheck the checkbox -> Input-File disable(Not working) this event is not working no idea why
– Frann Lp
Mar 25 at 7:24
It worked now! Thanks so much :) !! greetings from méxico
– Frann Lp
Mar 25 at 7:29
It worked now! Thanks so much :) !! greetings from méxico
– Frann Lp
Mar 25 at 7:29
welcome @FrannLp
– Aswin Kumar
Mar 25 at 7:30
welcome @FrannLp
– Aswin Kumar
Mar 25 at 7:30
add a comment |
$('input[type=checkbox]').change(function()
if ($("#ifChecked").prop('checked'))
console.log("Checked OK")
$('#Archivo').prop("disabled", false);
else
$('#Archivo').prop("disabled", true);
);
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<input id="Archivo" name="Archivo" type="file" accept=".pdf,.doc" disabled />
<input type="checkbox" name="ifChecked" id="ifChecked"> I ifChecked<br>
add a comment |
$('input[type=checkbox]').change(function()
if ($("#ifChecked").prop('checked'))
console.log("Checked OK")
$('#Archivo').prop("disabled", false);
else
$('#Archivo').prop("disabled", true);
);
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<input id="Archivo" name="Archivo" type="file" accept=".pdf,.doc" disabled />
<input type="checkbox" name="ifChecked" id="ifChecked"> I ifChecked<br>
add a comment |
$('input[type=checkbox]').change(function()
if ($("#ifChecked").prop('checked'))
console.log("Checked OK")
$('#Archivo').prop("disabled", false);
else
$('#Archivo').prop("disabled", true);
);
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<input id="Archivo" name="Archivo" type="file" accept=".pdf,.doc" disabled />
<input type="checkbox" name="ifChecked" id="ifChecked"> I ifChecked<br>
$('input[type=checkbox]').change(function()
if ($("#ifChecked").prop('checked'))
console.log("Checked OK")
$('#Archivo').prop("disabled", false);
else
$('#Archivo').prop("disabled", true);
);
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<input id="Archivo" name="Archivo" type="file" accept=".pdf,.doc" disabled />
<input type="checkbox" name="ifChecked" id="ifChecked"> I ifChecked<br>
$('input[type=checkbox]').change(function()
if ($("#ifChecked").prop('checked'))
console.log("Checked OK")
$('#Archivo').prop("disabled", false);
else
$('#Archivo').prop("disabled", true);
);
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<input id="Archivo" name="Archivo" type="file" accept=".pdf,.doc" disabled />
<input type="checkbox" name="ifChecked" id="ifChecked"> I ifChecked<br>
$('input[type=checkbox]').change(function()
if ($("#ifChecked").prop('checked'))
console.log("Checked OK")
$('#Archivo').prop("disabled", false);
else
$('#Archivo').prop("disabled", true);
);
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<input id="Archivo" name="Archivo" type="file" accept=".pdf,.doc" disabled />
<input type="checkbox" name="ifChecked" id="ifChecked"> I ifChecked<br>
answered Mar 25 at 6:35
AishwaryaAishwarya
383311
383311
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55332105%2ficheck-enable-disable-input-filebootstrap-button-when-i-check-a-checkbox%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown