[Solved] Multiple IF statements showing image when input are completed


if (document.getElementById('name').value != "" && document.getElementById('company').value != "" && document.getElementById('email').value != ""){
   document.getElementById('hiddenpdf').style.display = 'block'; 
}else{
    document.getElementById('hiddenpdf').style.display = 'none';
}

Hope this helps.

You have a syntax error in your code. Above solution checks with “and” logic and will only execute ‘block’ statement if all three conditions are met otherwise it will move over to else statement.

1

solved Multiple IF statements showing image when input are completed