Javascript "confirm" message boxes

They have: 135 posts

Joined: Apr 2000

Is there a way to customize them? This simple construction works perfectly for what I'm trying to do, except that I'd rather have the buttons say something other than "OK" and "Cancel". What I really need is "Yes" and "No" buttons; I can word the message in such a way that "OK" and "Cancel" make some sense, but it's pretty awkward wording.

I could bring up a regular old window to ask the question, but then I have to worry about passing parameters back and forth, etc.. confirm() is just so much handier...

John Pollock's picture

He has: 628 posts

Joined: Mar 1999

Hehe, we just had a discussion like that on alerts. You can take a look at it as it might get close. Not sure about JavaScript, but VBscript allows it. Smiling
Here is a link to that discussion:
http://www.javascriptcity.com/forums/showthread.php3?threadid=303&pagenumber=1

Hope it helps out in some way. Smiling

They have: 135 posts

Joined: Apr 2000

Yes, it helps a lot to know that (a) it just can't be done in JavaScript Sad and (b) that I now have another resource for finding answers to my JavaScript questions. Looks like a busy board!

I guess when I have some "slow time" (yeah, right) I'll look into implementing an intermediate window to query the user.

Thanks!

John Pollock's picture

He has: 628 posts

Joined: Mar 1999

Sure thing, glad it helped. Smiling

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.