🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: czemu to nie dzia³a pod firefox

#50222
From: porneL
Date: Wed, 25 Aug 2010 20:02
40 lines
1741 bytes
On Wed, 25 Aug 2010 15:19:02 +0100, pytajnik <pytajnikWYTNIJTO@onet.eu>  
wrote:

> Witam wszystkich i proszę o spojrzenie na mój problem.
>
> Mam taką oto funkcję
>
> function odkryj_ukryj(sel,id1,id2)
> {
> 	if(sel.value=='true')
> 		id1.style.display='';
> 	else
> 	{
> 		id1.style.display='none';
> 		id2.value='';
> 	}
> }
>
> i dwa elementy formularza
> SELECT:
>
> <select id="li" name="l" onChange="odkryj_ukryj(li,li_nr,li_nr_val);">

Tworzysz te zmienne gdzieś? Bo one nie biorą się z powietrza (nie licząc  
dziwadła w IE, które może być emulowane przez inne przeglądarki dla  
kompatybilności ze źle napisanymi stronami).

Użyj:

this.form.licencja_nr

albo

document.getElementById('li_nr_val');

-- 
http://pornel.net
this.author = new Geek("porneL");

http://pornel.net/krzaki-w-po?cie
Technical Details
Message-ID: <op.vh0fagubutk0y1@aimac.local>
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.rmf.pl!agh.edu.pl!news.agh.edu.pl!news.onet.pl!news.nask.pl!news.nask.org.pl!newsfeed.pionier.net.pl!news.gazeta.pl!not-for-mail
References: <63df.000000de.4c752656@newsgate.onet.pl>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.rmf.pl!agh.edu.pl!news.agh.edu.pl!news.onet.pl!news.nask.pl!news.nask.org.pl!newsfeed.pionier.net.pl!news.gazeta.pl!not-for-mail
From: porneL <niusy4@pornel.net>
Newsgroups: pl.comp.lang.javascript
Subject: Re: czemu to nie dzia³a pod firefox
Date: Wed, 25 Aug 2010 21:02:30 +0100
Organization: "Portal Gazeta.pl -> http://www.gazeta.pl"
Lines: 40
Message-ID: <op.vh0fagubutk0y1@aimac.local>
References: <63df.000000de.4c752656@newsgate.onet.pl>
NNTP-Posting-Host: 96.95.187.81.in-addr.arpa
Mime-Version: 1.0
X-Trace: inews.gazeta.pl 1282766551 17429 81.187.95.96 (25 Aug 2010 20:02:31 GMT)
X-Complaints-To: usenet@agora.pl
NNTP-Posting-Date: Wed, 25 Aug 2010 20:02:31 +0000 (UTC)
X-User: pornelspam
User-Agent: Opera Mail/10.70 (MacIntel)
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit