2

I want to add my project title to a javascript confirm dialog, and want to change "Ok" and "Cancel" to "Yes" and "No". How can I do this?

Rob Hruska
  • 115,151
  • 29
  • 164
  • 188

2 Answers2

9

We can't override the functionality of the JS . But you can show your project name on top by using the trick "nextline(/n)" as i did in my project :)

This is just an trail solution for your satisfaction . :)

confirm("ProjectName \n\n\n\n\ some question goes here ");
m.s.
  • 15,588
  • 6
  • 50
  • 81
5

If you're talking about confirm function in javascript, well, you can't change its properties. I suggest look into using a custom confirm dialog box e.g. jQuery UI's modal confirmation. You have many options out there and by using custom ones you have a lot of things you can do, you can even change colors of the box if you want. Just an idea :)

tradyblix
  • 7,151
  • 3
  • 24
  • 29