0

Could someone tell me whether Opera Mini (versions 4 and up) support the window.confirm() javascript method?

If not, what value does the method return?

var answer = window.confirm("Yes or no?");

Will answer be TRUE, FALSE, NULL or Undefined?

Rolf
  • 2,178
  • 4
  • 18
  • 29

2 Answers2

1

http://docstore.mik.ua/orelly/web/jscript/refp_434.html

either TRUE or FALSE

edit: and yes, for checking if it's supported read this thread: How to determine if window.confirm() is supported?

Community
  • 1
  • 1
lebryant
  • 351
  • 2
  • 18
  • The first link doesn't really shed any light on what the value of answer will be if window.confirm() is NOT supported in Opera Mini, does it? Of course Opera Mini MIGHT return true or false as a fallback, but null or undefined seem just as likely. – Rolf Sep 05 '12 at 07:04
1

Opera Mini does support this method.

Open this link in Opera mini to ensure.

Spadar Shut
  • 15,111
  • 5
  • 47
  • 54
  • Thanks, but if I had a phone with Opera Mini to test this with, I would already have tested it. I'm asking because I don't. – Rolf Sep 05 '12 at 07:05
  • If you have tested it, and confirmed (no pun intended) that it works, could you please tell me with what version of Opera Mini you tested? – Rolf Sep 05 '12 at 07:06
  • 1
    Tested with Opera Mini 7.0, but I guess this will work in any version. Can't believe you have no device to test on, Opera Mini runs on virtualy any phone that has Java. – Spadar Shut Sep 05 '12 at 12:21
  • You should have a look at this article about Opera Mini http://dev.opera.com/articles/view/opera-mini-and-javascript/ – Spadar Shut Sep 05 '12 at 12:32
  • I truly do not have a device to test this on, because my phone died and I'm using an antique Nokia dumbphone (yes, too old to even run Opera Mini) until I get a new one. – Rolf Sep 06 '12 at 08:44