Einzelnen Beitrag anzeigen

Benutzerbild von s.h.a.r.k
s.h.a.r.k

Registriert seit: 26. Mai 2004
3.159 Beiträge
 
#4

AW: [Javascript] Array Download als Datei

  Alt 13. Jul 2011, 12:05
Ich nutze für sowas imm jQuery (Doku) -- hier mal ein Beispiel fürs Senden der Daten zum Server:
Code:
var destinationUrl = http://example.com/destination/save-and-generator-download-link.php;
var serializedArray = $.serializeArray(myArray);
$.ajax({
    url: destinationUrl,
    type: 'POST',
    data: serializedArray,
    success: function() { alert('done'); },
    error: function() { alert('failed'); },
});
Vielleicht hilfts, mir war gerade danach das zu posten
»Remember, the future maintainer is the person you should be writing code for, not the compiler.« (Nick Hodges)
  Mit Zitat antworten Zitat