This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Themabewertung:
  • 0 Bewertung(en) - 0 im Durchschnitt
  • 1
  • 2
  • 3
  • 4
  • 5
löschen und refresh an allen clients
#1
hallo,

ich leere meine Tabelle (mariadb) und aktualisiere meinen Client.
Wie ist es möglich, dass alle Clients aktualisiert werden?

 function clear_table() {
	let confirmAction = confirm("Wollen Sie wirklich alle Einträge aus der Tabelle restlos löschen?");
	 if (confirmAction) {
	  alert("Löschvorgang wird ausgeführt!");
	  var message = 'table_clear';
	   dataString_table_clear = 'table_clear='+message;
	   $.ajax({
         type: 'POST',
         url: 'developmentOESoft.homepage.php',
         data: dataString_table_clear,	
 		 success: function(response){
			 if(response==dataString_table_clear) {	
			     alert('Fehlerfrei uebertragen Code 0200');
				 clear_refresh();
             } else {
		         alert('Uebertragungsfehler Code 0100');
	         }
         }	
     });

	 } else {
	  alert("Löschvorgang abgebrochen!");
	 }
}

 function clear_refresh() {
	 location.reload();
 }
Zitieren
#2
Hi black79,
es gibt da mehrere Wege und Ansätze. Du könntest alle paar sekunden einen Request machen und abfragen ob die Einträge noch vorhanden sind.
"Gerne dürft ihr mir eine gute Bewertung da lassen aber auch gegenüber Kritik bin ich offen" Angel
Als Lösung markieren Zitieren


Gehe zu:


Benutzer, die gerade dieses Thema anschauen: 1 Gast/Gäste