Whu am i receiving error when using Confirm("") | Sololearn: Learn to code for FREE!
Nouvelle formation ! Tous les codeurs devraient apprendre l'IA générative !
Essayez une leçon gratuite
0

Whu am i receiving error when using Confirm("")

alert, prompt and confirm

17th Apr 2018, 3:25 AM
adam
5 Réponses
0
post the code
17th Apr 2018, 3:32 AM
Akib
Akib - avatar
0
without a code i could just suggest you something ... 1 - alert, prompt and confirm are written in lowercase 2 - if you haven't done yet try to use window.onload, ie: window.onload = function(){ //you're code goes here; alert("Hi!"); }
17th Apr 2018, 3:38 AM
Michele Virgilio
Michele Virgilio - avatar
0
thanks, i was trying it in an android app called javascriot, and it always returns>> function not defind!
17th Apr 2018, 3:46 AM
adam
0
var result = confirm("Do you really want to leave this page?"); if (result == true) { alert("Thanks for visiting"); } else { alert("Thanks for staying with us"); }
17th Apr 2018, 3:48 AM
adam
0
the code works, there aren't errors ... i don't know javascriot but could it be that it doesn't support native javascript? what you've pasted is the full code or do you have any Dom reference?
17th Apr 2018, 4:04 AM
Michele Virgilio
Michele Virgilio - avatar