Javascript-форум (https://javascript.ru/forum/)
-   Ваши сайты и скрипты (https://javascript.ru/forum/project/)
-   -   убрать окно подтверждения (https://javascript.ru/forum/project/49905-ubrat-okno-podtverzhdeniya.html)

ttt 02.09.2014 19:25

убрать окно подтверждения
 
Здравствуйте! При удалении товара из корзины появляется окно подтверждения .......как можно его убрать изменить, что бы оно не появлялась при удалении вообще (если это возможно).........Спасибо
this.delItem = function(id)
{
if (confirm("удалить #" + id + "?"))
{
$("#btable").html("");
delete this.DATA[id];
this.IDS.splice( $.inArray(id, this.IDS), 1 );
this.reCalc();
this.renderBasketTable();
localStorage.setItem(this.cardID, JSON.stringify(this.DATA));
localStorage.setItem(this.cardID + "_ids", JSON.stringify(this.IDS));
}

Aetae 02.09.2014 19:30

if (confirm("удалить #" + id + "?"))
{
$("#btable").html("");
delete this.DATA[id];
this.IDS.splice( $.inArray(id, this.IDS), 1 );
this.reCalc();
this.renderBasketTable();
localStorage.setItem(this.cardID, JSON.stringify(this.DATA));
localStorage.setItem(this.cardID + "_ids", JSON.stringify(this.IDS));
}
=>
$("#btable").html("");
delete this.DATA[id];
this.IDS.splice( $.inArray(id, this.IDS), 1 );
this.reCalc();
this.renderBasketTable();
localStorage.setItem(this.cardID, JSON.stringify(this.DATA));
localStorage.setItem(this.cardID + "_ids", JSON.stringify(this.IDS));

ttt 02.09.2014 19:41

Спасибо помогло :)


Часовой пояс GMT +3, время: 15:30.