Reputation: 41
I have a validation where i want to show 'Continue' and 'Return' instead of OK and Cancel but I am not able to find accurate solution, can anyone help me on this.
<input type="button" name="submit" value="Submit" style="font:10px;">
<xsl:attribute name="onclick">
javascript:
var amount = document.getElementById('txtboxAdjustment14').value.trim();
if(amount == 0)
{
var cont =confirm("Have you considered amount?")
if (cont == true)
{
somemethod();
}
else if(cont == false)
{
return false;
}
}
else
{
somemethod();
}
</xsl:attribute>
</input>
Upvotes: 0
Views: 34617
Reputation: 57105
You cannot change the buttons in JavaScript dialog.
Upvotes: 1
Reputation: 29176
There's no decent cross-browser solution for doing that. I'd suggest you to use some library like jQuery UI to build a custom OK-Cancel dialog.
Check out this modal confirmation dialog.
Upvotes: 0
Reputation: 94499
You cannot change the buttons on the javascript confirm dialog. You would need to use a custom dialog implementation such as the one contained in SimpleModal.
Upvotes: 0