🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: <a> escaping malformed URI reference

#50286
From: Peter May
Date: Sun, 19 Sep 2010 17:33
18 lines
1541 bytes
W dniu 2010-09-19 16:06, Stefan pisze:
> jivanmuktaWYTNIJTO@poczta.onet.pl pisze:
>> Na następującym znaczniku:
>>
>> <a href="javascript:show_calendar('document.announcement.valid_from',
>> document.announcement.valid_from.value, 'images');">
>
> Zacznijmy od tego, ze nie powinno sie wywolywac kodu javascript za
> pomoca <a href='javascript:....
>
> Prawidlowo powinno byc <a onclick='..., a pod href mozna podpiac
> odnosnik do ktorego przejda osoby bez javascript.

Jeszcze lepiej po prostu nadać id elementowi <a> i potem w kodzie JS 
podpiąć odpowiednio funkcję pod zdarzenie.

-- 
Peter
Technical Details
Message-ID: <i75hgu$150$1@news.onet.pl>
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.rmf.pl!agh.edu.pl!news.agh.edu.pl!news.onet.pl!not-for-mail
References: <7d75.00000302.4c937383@newsgate.onet.pl> <i755ck$6bc$1@inews.gazeta.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!not-for-mail
From: Peter May <peter.may@onet.pl>
Newsgroups: pl.comp.lang.javascript
Subject: Re: <a> escaping malformed URI reference
Date: Sun, 19 Sep 2010 19:33:15 +0200
Organization: http://onet.pl
Lines: 18
Message-ID: <i75hgu$150$1@news.onet.pl>
References: <7d75.00000302.4c937383@newsgate.onet.pl> <i755ck$6bc$1@inews.gazeta.pl>
NNTP-Posting-Host: 188.146.238.223.nat.umts.dynamic.eranet.pl
Mime-Version: 1.0
X-Trace: news.onet.pl 1284917599 1184 188.146.238.223 (19 Sep 2010 17:33:19 GMT)
X-Complaints-To: niusy@onet.pl
NNTP-Posting-Date: Sun, 19 Sep 2010 17:33:19 +0000 (UTC)
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; pl; rv:1.9.2.9) Gecko/20100915 Lightning/1.0b2 Thunderbird/3.1.4
In-Reply-To: <i755ck$6bc$1@inews.gazeta.pl>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit