I\'m trying to use the jQuery alerts dialog library from http://abeautifulsite.net/notebook/87 instead of the default alerts (which look pretty awful in my opinion). This se
This thing works. Needs jQuery.
function myconfirm(kyssa, elm, e){ // neG
if(jQuery('#confirmquestion').data('result')){
var V = jQuery('#confirmquestion').data('result');
jQuery('#confirmquestion').remove();
return V == 'Y' ? true : false;
}else if(!jQuery('#confirmquestion').length){
jQuery('body').append(''+
'Kinnitus
'+
''+kyssa+''+
''+
' '+
' '+
'');
jQuery('#confirmquestion button').click(function(){
jQuery(elm).trigger(e.type);
})
}
return false;
}
onChange="if(myconfirm(\'Saada kiri: \'+jQuery(this).find(\'option:selected\').html()+\' ?\', this, event)) { ... }"
CSS
#confirmquestion{
border:1px solid #999;
background:white;
padding-bottom: 30px;
position:fixed;
width:300px;
font-size:12px;
top:45%;
left:50%;
margin-left:-150px;
}
#confirmquestion h4 {
background:blue;
color:white;
margin:0;
padding: 2px 5px;
border-bottom:#777;
text-align:center;
}
#confirmquestion #kyssa {
padding: 30px 25px;
}