javascript - how to remove or change the popup automatic message -
i display popup ask confirmation of delete record, popup displays "system message" "the page @ address mywebsite show:" follows message "are sure ....".
i want display message 'are sure ?'not message 'the page @ address mywebsite show:' above message.
how can please ? thank in advance.
<a href="php/delete.php5?" onclick="return confirm('are sure ?');"><img src="images/cancel16x16.png"></a>
the title javascript confirm()
unfortunately unchangeable (see question: changing default title of confirm() in javascript?) , that's same changing of style & looks too.
to allow use common scripts such callbacks, change of text or event changes etc. on javascript confirm()
s. these better left helpers such jquery ui dialog (there many others too) uses <div>
s mimic confirm()
behaviour , provide much, more control web developer.
<script> $(function() { $( "#userconfirm" ).on('click', function() { $('#dialog').dialog({ title: "your new title" }); }); </script> <a href="php/delete.php5?" id="userconfirm"> <img src="images/cancel16x16.png"> </a> <div id="dialog" title="basic dialog"> <p>are sure?</p> </div>
Comments
Post a Comment