Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> [JavaScript] pobranie danych z function()
Randallmaster
post 14.08.2014, 11:09:45
Post #1





Grupa: Zarejestrowani
Postów: 677
Pomógł: 11
Dołączył: 18.11.2009

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


Jak z funkci: function(e) mogę wyciągnąć link na zewnątrz aby alert mi wyświetlił to co jest w środku?

http://jsfiddle.net/d3H9f/147/

albo do funkcji dodać jakąś zmienną?

Ten post edytował Randallmaster 14.08.2014, 11:28:47
Go to the top of the page
+Quote Post
werdan
post 14.08.2014, 13:37:52
Post #2





Grupa: Zarejestrowani
Postów: 354
Pomógł: 100
Dołączył: 14.11.2013
Skąd: Płock

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


Opisz dokładniej co chcesz otrzymać, bo tak to cięzko skumać.

Jesli chcesz w alert z linii 11 otrzymać zmienną link to wsadz go do funkcji reader.onload = function (e) {}
Go to the top of the page
+Quote Post
Randallmaster
post 14.08.2014, 13:42:50
Post #3





Grupa: Zarejestrowani
Postów: 677
Pomógł: 11
Dołączył: 18.11.2009

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


no wiem że mogę wsadzić alerta do zmiennej reader.onload = function (e) {}

ale w funkcji tej jak mam multiple upload to nie czyta nazw plików tylko podaje pierwszy pobrany

opisałem dokładnie tutaj:

http://jsfiddle.net/d3H9f/148/

Ten post edytował Randallmaster 14.08.2014, 13:49:52
Go to the top of the page
+Quote Post
aniolekx
post 14.08.2014, 16:01:02
Post #4





Grupa: Zarejestrowani
Postów: 340
Pomógł: 46
Dołączył: 31.07.2009
Skąd: A

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


z tej stronki znalazlem takie cos, moze podpowie:

Kod
  reader.onload = function(e) {
    fileDisplayArea.innerHTML = "";

    // Create a new image.
    var img = new Image();
    // Set the img src property using the data URL.
    img.src = reader.result;

    // Add the image to the page.
    fileDisplayArea.appendChild(img);
  }
Go to the top of the page
+Quote Post

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

 



RSS Wersja Lo-Fi Aktualny czas: 30.06.2025 - 00:28