0

//html

 <form name="userupdateaboutform" class="userupdateaboutclass" id="userupdateaboutformid">
       <textarea type="text" class="updateaboutusclass" name="aboutus" placeholder="About Us"  ></textarea><br>    
          <button name="updateabout" class="btn btn-primary" id="updateaboutid">update</button> 
      </form>

//script

  var btnupdtabout = document.getElementById('updateaboutid');
    if(btnupdtabout){
        btnupdtabout.addEventListener('click', function(e){
      
              console.log(e);
            
          })
    }

can't see the error even i used the logs all i see is that 'uncaught' error message since the function leaves so fast, what im trying to do here is when i click the button the modal will pop up. but it is not functioning properly

  • 2
    It might be because your ` – unspeakable29 Jun 09 '22 at 03:57
  • You can use ` onsubmit="return validateForm()"` attr for `form` – mehmet Jul 07 '22 at 09:15

0 Answers0