I am new to Javascript and jquery and trying to learn
I made a submit button that stay disabled while the client doesn't upload an image. It is working fine. The submit button is called PROSEGUIR. What I am trying to do is... if the client try to click in the PROSEGUIR button while it is disabled, it pop up an alert msg.. but it is not working.
Check out the html button:
<input type="submit" disabled="disabled" name="proseguir" id="proseguir" value="Prosseguir >>" class="bg-red btn_next_two">
Is that right ?? NOw, I wrote this listener after jquery in
<script>
$(document).ready(function(){
$("#proseguir").click(function(){
if($(this).is('[disabled=disabled]') == true) {
alert("Please upload an image before submitting");
}
});
});
</script>
What am I doing wrong ? because it is not working. When the user click in PROSEGUIR button (submit) while it is disabled an alert pop up doesn't show up...
Please, help me !!