2

I need to convert following function to javascript,

MsgBox("Are you a programmer?",0,"Please answer")

I think I can use confirm("Are you a programmer?")

but I want to know how to add button order there ?

asked Jan 29, 2013 at 14:14
3
  • What do you mean with button order ? Commented Jan 29, 2013 at 14:18
  • 2
    If confirm or prompt won't do, you'll have to create your own. Using a combination of html/css/js. Commented Jan 29, 2013 at 14:19
  • 1
    if I put, 0 = vbOKOnly(OK button only). and other numbers have deferent meanings Commented Jan 29, 2013 at 14:23

1 Answer 1

2

Javascript does not have the custimizability that vbscript does with this function. And yes, it is confirm(). For example,

var choice=confirm("pick a button");
if(choice) alert("you picked ok");
else alert("you picked cancel")

You cannot control what the buttons say like in vbscript.

answered Jan 29, 2013 at 14:22

Comments

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.