![]() |
![]() ![]() |
![]() |
![]()
Post
#1
|
|
Grupa: Zarejestrowani Postów: 3 Pomógł: 0 Dołączył: 18.09.2010 Ostrzeżenie: (0%) ![]() ![]() |
Witam,
Mam problem z powtarzajaca sie nazwa formularza usuwajacego rekordy oraz elementu input WCZYTUJE DANE Z BAZY
FORMULARZEM przesylam id do JS function ajax_del(a) { var id = document.bbb.id.value; if (window.XMLHttpRequest){ xmlhttp=new XMLHttpRequest(); } else {xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");} xmlhttp.onreadystatechange=function() { if (xmlhttp.readyState == (1 || 0)) { document.getElementById('loading').style.display = 'block'; } if (xmlhttp.readyState != (1 || 0 || 4)) { document.getElementById('loading').style.display = 'none'; } if (xmlhttp.readyState==4 && xmlhttp.status==200) { document.getElementById(a).innerHTML= '<div class="scrolling">'+xmlhttp.responseText+'</div>';} } xmlhttp.open("POST","pages/"+a+".php5",true); xmlhttp.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); xmlhttp.send("&id=" + id ); } formularzem przesylam id do AJAX i usuwam rekord, wszystko dziala jesli w bazie jest tylko 1 rekord bo jesli jest wiecej to powtarza sie nazwa form i input i w tym momencie ajax nie dostaje id, ktore jest mi potrzebne zeby usunac rekord z bazy Wiecie jak mozna rozwiazac problem ![]() |
|
|
![]()
Post
#2
|
|
![]() Grupa: Zarejestrowani Postów: 380 Pomógł: 59 Dołączył: 24.04.2010 Skąd: London Ostrzeżenie: (0%) ![]() ![]() |
-------------------- |
|
|
![]() ![]() |
![]() |
Wersja Lo-Fi | Aktualny czas: 18.06.2025 - 06:35 |