0

As You Can See Once I Input Something On The Text Area A Field Will Show Up But When The text Area Is Empty The Field That Has Been Shown Will Hide. The Code Is Working When I Input Something In But Once I Delete Everything I Input In It, The Field Shown Is Not Hiding

$("#ctl00_ctl40_g_3ad16ef4_28d6_4568_997d_dc844d50e64e_ff81_ctl00_ctl00_TextField").change(function(){

 if ($("input[title='Resolution']").val() == ""){
                            $('nobr:contains("Department Head Approver")').closest('tr').hide();
                            }
                    else   if ($("input[title='Resolution']").val() != ""){
                            $('nobr:contains("Department Head Approver")').closest('tr').show();
                            }
 });
  • https://stackoverflow.com/questions/7105997/javascript-change-event-on-input-element-fires-on-only-losing-focus/7106392 – NullPointer Jul 10 '18 at 02:08
  • thank you your article let me think i just add an empty variable and change my condition code to this var emptyvariable = "" if ($("input[title='Resolution']").val() == emptyvariable) – gabrielon98 Jul 10 '18 at 02:53

0 Answers0