🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: pl.comp.lang.javascript
Article #51647

Re: problem z formularzem

#51647
From: Łukasz
Date: Sun, 06 Mar 2016 12:16
16 lines
1577 bytes
W dniu 06.03.2016 o 00:38, Cezary Tomczyk pisze:
> Nie podpinaj inline event handlerów -> onclick="pliki_edytuj()". Problem
> tutaj masz taki, że funkcja pliki_edytuj jest wywoływana w globalnym
> kontekście, czyli window, a jej tam nie ma. A przynajmniej domyślam się,
> że jej tam nie ma ;-)
>
> Zamiast inline event handlerów zrób to poprawnie:
>
> $('#btnSave').click(pliki_edytuj);
>
> https://jsfiddle.net/sygd9aa3/1/
>

Jak ustawię sobie breakpoint to widzę że pliki_edutuj się wykonuje, ale
var formData = new FormData($('#awizo_pliki_edytuj')[0]);
zwraca undefined
Technical Details
Message-ID: <nbh73a$b2t$1@node2.news.atman.pl>
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!agh.edu.pl!news.agh.edu.pl!newsfeed2.atman.pl!newsfeed.atman.pl!.POSTED!not-for-mail
References: <nbfoiq$ulj$1@node2.news.atman.pl> <affac$56db6ddc$520da86c$1156@nntpswitch.blueworldhosting.com>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!agh.edu.pl!news.agh.edu.pl!newsfeed2.atman.pl!newsfeed.atman.pl!.POSTED!not-for-mail
From: Łukasz <lukaszWy@rostalskiTnijTo.pl>
Newsgroups: pl.comp.lang.javascript
Subject: Re: problem z formularzem
Date: Sun, 6 Mar 2016 13:16:42 +0100
Organization: ATMAN - ATM S.A.
Lines: 16
Message-ID: <nbh73a$b2t$1@node2.news.atman.pl>
References: <nbfoiq$ulj$1@node2.news.atman.pl> <affac$56db6ddc$520da86c$1156@nntpswitch.blueworldhosting.com>
NNTP-Posting-Host: 94-40-64-237.hinet.pl
Mime-Version: 1.0
X-Trace: node2.news.atman.pl 1457266602 11357 94.40.64.237 (6 Mar 2016 12:16:42 GMT)
X-Complaints-To: usenet@atman.pl
NNTP-Posting-Date: Sun, 6 Mar 2016 12:16:42 +0000 (UTC)
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0
In-Reply-To: <affac$56db6ddc$520da86c$1156@nntpswitch.blueworldhosting.com>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit