Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> zmiana nazwy plik (jQuery)
omxd
post
Post #1





Grupa: Zarejestrowani
Postów: 135
Pomógł: 0
Dołączył: 18.05.2010

Ostrzeżenie: (0%)
-----


Witam,
da się zmienić nazwe pliku z poziomu jquery?.Zmieniam ją za pomocą php ,ale kompletnie nie mam pomysły jak nową nazwe "upchnąc" do zmiennej file.Ktoś coś podpowie?.

  1. var btnUpload=$j('#upload');
  2. var status=$j('#status');
  3. new AjaxUpload(btnUpload, {
  4. action: 'upload-file.php',
  5. name: 'uploadfile',
  6. onSubmit: function(file, ext){
  7.  
  8. if (! (ext && /^(jpg|png|jpeg|gif)$/.test(ext))){
  9. // extension is not allowed
  10. status.text('Only JPG, PNG or GIF files are allowed');
  11. return false;
  12. }
  13. status.text('Ladowanie...');
  14. },
  15. onComplete: function(file, response){
  16. //On completion clear the status
  17. status.text('');
  18. //Add uploaded file to list
  19. if(response==="success"){
  20. $j('#files').html('<img src="data/photo/poczekalnia/'+file+'" alt="" /><br />'+file).addClass('success');
  21.  
  22. } else{
  23. $j('<li></li>').appendTo('#files').text(file).addClass('error');
  24. }
  25. }
  26. });

pozdrawiam
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 20.09.2025 - 04:58