Hi Maila it's a nice solution. I only found a detail: If the user does not select any rating and presses submit, the script shows the thank you card. It must show a warning or a message. You can solve this by declaring ex as a global variable, calling from the HTML only the hide function, and adding a check inside it. Something like this...
var ex = 0;
function esconde(el) {
if( ex == 0 ){
alert("message");
}else{
var display = document.getElementById(el).style.display;
if(display == "none")
document.getElementById(el).style.display = 'block';
else
document.getElementById(el).style.display = 'none';
mostra(el);
}
}
I didn't test it so it may have some error but that would be the idea... I hope I have helped, regards 😉
Marked as helpful
1
Maila Cardoso• 30
@mailacss
Posted
@fico444 Done, thank you!
0