My problem is why this codes dont work. i want to upload image with hide input type file but doesnt work. here are my codes..
<form action="" method="post" enctype="multipart/form-data">
<div id ="settingmaincontainerright">
<input type="file" id="settingprofileimgfile" name ="settingprofileimgfile" >
<input type="submit" id="settingprofileimgfilebutton" name="settingprofileimgfile" value="Choose Foto">
<input type="submit" id="settingprofileimgbutton" name="settingprofileimg" value="Upload Foto">
</div>
</form>
This is css.
#settingprofileimgfile{
width:100%;
height:100px;
display:none;
}
#settingprofileimgfilebutton{
width:100%;
height:100px;
border-top-right-radius: 30px;
cursor:pointer;
}
#settingprofileimgbutton{
width:100%;
height:100px;
border-bottom-right-radius: 30px;
cursor:pointer;
}
#settingmaincontainer{
width:90%;
margin:auto;
border:3px solid #FF4500;
border-radius:30px;
height :200px;
margin-top:10px;
}
Here is JS..
$(function(){
$("#settingprofileimgfilebutton").click(function() {
$("#settingprofileimgfile").click();
});
});