Article View: pl.comp.lang.javascript
Article #50613Re: komunikat jest pusty lub nie jest obiektem
From: BooB
Date: Thu, 03 Mar 2011 09:41
Date: Thu, 03 Mar 2011 09:41
36 lines
2549 bytes
2549 bytes
On 2 Mar, 16:58, Szyk <szyk...@o2.pl> wrote: > o matko!!!! > > Czyta e w og le co na temat dorywania si do element w formularza z > JS??? Bo ten b d znaczy tyle, e elements s "nie halo". Ja nie robi w > tym temacie, ale w sekund sobie wygoogla em co takiego:http://www.quirksmode.org/js/forms.htmli tam jest pod koniec fajny > rozdzia "Accessing the form elements". No i tam podaje si 2 metody: > > 1) > document.forms[number].elements[number] > > W tym wypadku musisz z bani poda numery wynikaj ce z pozycji formularza > (pierwszy number) i elementu w formularzu (drugi number). No i > oczywi cie musisz tych numer w pilnowa !!! > > 2) > In some cases, it's better to use the names of the forms and elements. > In HTML, you have to give a name to each form and each element, like: > > <form name="personal" action="something.pl" onsubmit="return checkscript()"> > <input type=text size=20 name=name> > <input type=text size=20 name=address> > <input type=text size=20 name=city> > </form> > > Now you can access these elements by: > > document.personal.name > document.personal.address > document.personal.city > > W tym wypadku nazwy maj automagicznie zmienia si w obiekty. > > Nie sprawdzi em ani pierwszej ani drugiej metody, wi c nie r cz za to... bardzo dziekuję za wskazówki .
Technical Details
Message-ID:
<8af944fa-ec8a-4d25-9a06-b3984a62eab8@u12g2000vbf.googlegroups.com>Path:
mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.gazeta.pl!newsfeed.pionier.net.pl!news.glorb.com!postnews.google.com!u12g2000vbf.googlegroups.com!not-for-mailReferences:
<017eb811-3aa3-4121-bad9-bac6e9523a1c@y3g2000vbh.googlegroups.com> <4d6e6917$0$2441$65785112@news.neostrada.pl>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.gazeta.pl!newsfeed.pionier.net.pl!news.glorb.com!postnews.google.com!u12g2000vbf.googlegroups.com!not-for-mail From: BooB <max-in@wp.pl> Newsgroups: pl.comp.lang.javascript Subject: Re: komunikat jest pusty lub nie jest obiektem Date: Thu, 3 Mar 2011 01:41:26 -0800 (PST) Organization: http://groups.google.com Lines: 38 Message-ID: <8af944fa-ec8a-4d25-9a06-b3984a62eab8@u12g2000vbf.googlegroups.com> References: <017eb811-3aa3-4121-bad9-bac6e9523a1c@y3g2000vbh.googlegroups.com> <4d6e6917$0$2441$65785112@news.neostrada.pl> NNTP-Posting-Host: 178.36.53.255 Mime-Version: 1.0 X-Trace: posting.google.com 1299145286 4195 127.0.0.1 (3 Mar 2011 09:41:26 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Thu, 3 Mar 2011 09:41:26 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: u12g2000vbf.googlegroups.com; posting-host=178.36.53.255; posting-account=0PweLwoAAAD7u_TEvl7sl1V26gMlfF37 User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 2.0.50727; .NET CLR 1.1.4322; InfoPath.2; .NET4.0C; .NET4.0E),gzip(gfe) Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit