I am using a javascript code to show a invisible . The invisible is only appearing after clicking on textbox tb1
.
I am using an SQL query to fill the text in textbox tb1
.
I am using the following code:
<script type="text/javascript">
$(window).load(function(){
$('#tb1').on('change', function() {
if($(this).val() != ""){
$("#area2").show();
}
});
$('#tb1').focus('change', function() {
$("#area2").show();
});
}); // Closes window.load
</script>
Is there a way to show area2
when the text of textbox tb1
is changed? Without clicking on it?