Rename default button name in popup box - Javascript ONLY

What i’ve tried so far…

Html

  <input type="button" name="add" value="Add" onClick="fnClick();"/>

Javascript

    function fnClick() 
    {
		if(confirm("Hello World?"))
		{	
	   	     popupWindow(' link ');
	   	}   
	   	     popupWindow(' link ');
	
     }

Please help, i want to rename “CANCEL” to “NO” . Any help would be appreciated. Thanks

AFAIK, It is not possible to change the content of the buttons in the dialog displayed by the confirm function.
You can however, use Javascript to create a dialog that looks similar and name the buttons whatever you like.

Using jQueryUI, for example:

$("#id").dialog({
  buttons: {
    "Yes": function() {},
    "No": function() {}
  }
});

Reference

To confirm what Pullo said, no it’s not possible. Your best bet is to create one like Pullo suggested.

I googled Custom Javascript Popup Boxes and was astounded how many links came up. Google what I typed in and you will find hundreds of scripts to choose from.

You shouldn’t be using the debugging confirm box in a live page. What it does is determined by the browser (including any checkboxes for turning off JavaScript or turning off display of confirm boxes).

I have my browser set to simply return true and never display debugging confirm boxes since their only purpose is to interrupt broken JavaScript.